Skip to content

Commit adcaceb

Browse files
Try new docker image layout
1 parent 7ad6a8d commit adcaceb

35 files changed

+204
-470
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
2+
ARG TARGETARCH
3+
WORKDIR /source
4+
5+
COPY --link $safeprojectname$/*.csproj .
6+
RUN dotnet restore -a $TARGETARCH
7+
8+
COPY --link $safeprojectname$/. .
9+
RUN dotnet publish --no-restore -a $TARGETARCH -o /app
10+
11+
# Enable globalization and time zones:
12+
# https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md
13+
14+
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine
15+
EXPOSE 8080
16+
WORKDIR /app
17+
COPY --link --from=build /app .
18+
USER $APP_UID
19+
ENTRYPOINT ["./$safeprojectname$"]

Templates/ServerSentEvents/Dockerfile.linux-arm32

Lines changed: 0 additions & 19 deletions
This file was deleted.

Templates/ServerSentEvents/Dockerfile.linux-arm64

Lines changed: 0 additions & 19 deletions
This file was deleted.

Templates/ServerSentEvents/Dockerfile.linux-x64

Lines changed: 0 additions & 19 deletions
This file was deleted.

Templates/ServerSentEvents/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ following commands in your terminal (and adjust the first line
2222
depending on your platform).
2323

2424
```
25-
docker build -f Dockerfile.linux-x64 -t $safeprojectname$ .
25+
docker build -t $safeprojectname$ .
2626
2727
docker run -p 8080:8080 $safeprojectname$
2828
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
2+
ARG TARGETARCH
3+
WORKDIR /source
4+
5+
COPY --link $safeprojectname$/*.csproj .
6+
RUN dotnet restore -a $TARGETARCH
7+
8+
COPY --link $safeprojectname$/. .
9+
RUN dotnet publish --no-restore -a $TARGETARCH -o /app
10+
11+
# Enable globalization and time zones:
12+
# https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md
13+
14+
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine
15+
EXPOSE 8080
16+
WORKDIR /app
17+
COPY --link --from=build /app .
18+
USER $APP_UID
19+
ENTRYPOINT ["./$safeprojectname$"]

Templates/SinglePageApplication/Dockerfile.linux-arm32

Lines changed: 0 additions & 19 deletions
This file was deleted.

Templates/SinglePageApplication/Dockerfile.linux-arm64

Lines changed: 0 additions & 19 deletions
This file was deleted.

Templates/SinglePageApplication/Dockerfile.linux-x64

Lines changed: 0 additions & 19 deletions
This file was deleted.

Templates/SinglePageApplication/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ following commands in your terminal (and adjust the first line
2222
depending on your platform).
2323

2424
```
25-
docker build -f Dockerfile.linux-x64 -t $safeprojectname$ .
25+
docker build -t $safeprojectname$ .
2626
2727
docker run -p 8080:8080 $safeprojectname$
2828
```

0 commit comments

Comments
 (0)