Skip to content

Commit 37c7821

Browse files
committed
fix build
1 parent 1e13062 commit 37c7821

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ dotTinyNet Ahead-of-Time compilation compiler
1818
Copy `build.sh` to your .NET project directory. It can be in the project root, or
1919
sub directory.
2020

21+
wget https://raw.githubusercontent.com/dotTinyNet/DockerAOT/refs/heads/main/build.sh
22+
chmod +x build.sh
23+
2124
Optionally copy `Dockerfile`. Without it, the pre-compiled version from GitHub
2225
will be pulled.
2326

2427
Optionally copy and edit `copyTo.sh` to copy the executable to your device.
2528

26-
chmod +x build.sh
29+
2730
./build.sh

arm64/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ RUN chmod +x /startup.sh
3434

3535
ENV DOTNET_CLI_HOME=/src
3636

37-
CMD ["/startup.sh"]
37+
ENTRYPOINT ["/startup.sh"]

build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
# Optionally include the Dockerfile. Without, the default image will be pulled from GitHub.
55
# Optionally inclide a copyTo.sh, to copy the executable to a device.
66

7-
PROJECT_NAME=""
7+
PROJECT_NAME="" #if you leave this empty, dotnet will try to build the whole solution.
88
SDK="9.0"
99
ARCH="arm64"
1010
OUTPUT="/bin/$ARCH"
1111

1212

1313
# If Dockerfile is present, then use that. Otherwise, use image from GitHub
1414
if [ -f "Dockerfile" ]; then
15-
IMAGE="tinydotnet-builder-arm64"
15+
IMAGE="tinydotnet-AOT-$ARCH-$SDK"
1616

1717
# Check if "build" is in arguments or build-dotnet-arm64 image doesn't exist
1818
if [[ "$*" == *"build"* ]] || ! docker images | grep -q $IMAGE; then
@@ -22,6 +22,7 @@ if [ -f "Dockerfile" ]; then
2222

2323
else
2424
IMAGE="ghcr.io/dottinynet/dockeraot:$ARCH-$SDK"
25+
docker pull $IMAGE
2526
fi
2627

2728

@@ -51,12 +52,11 @@ set +e
5152

5253
OUTPUTPATH=$PROJECTPATH/$OUTPUT
5354

54-
rm -f $OUTPUTEXE*
55-
docker run --rm -it --net=host -u $(id -u):$(id -g) -v $PROJECTPATH:/src $IMAGE startup.sh $PROJECT_NAME
55+
rm -f $OUTPUTPATH*
56+
docker run --rm -it --net=host -u $(id -u):$(id -g) -v $PROJECTPATH:/src $IMAGE $PROJECT_NAME
5657

5758
# ----- Optional Copy
5859

5960
if [ -f "copyTo.sh" ]; then
6061
source copyTo.sh $@
6162
fi
62-

0 commit comments

Comments
 (0)