Skip to content

Commit

Permalink
Try new docker image layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaliumhexacyanoferrat committed Jan 21, 2025
1 parent 7ad6a8d commit adcaceb
Show file tree
Hide file tree
Showing 35 changed files with 204 additions and 470 deletions.
19 changes: 19 additions & 0 deletions Templates/ServerSentEvents/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
ARG TARGETARCH
WORKDIR /source

COPY --link $safeprojectname$/*.csproj .
RUN dotnet restore -a $TARGETARCH

COPY --link $safeprojectname$/. .
RUN dotnet publish --no-restore -a $TARGETARCH -o /app

# Enable globalization and time zones:
# https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md

FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine
EXPOSE 8080
WORKDIR /app
COPY --link --from=build /app .
USER $APP_UID
ENTRYPOINT ["./$safeprojectname$"]
19 changes: 0 additions & 19 deletions Templates/ServerSentEvents/Dockerfile.linux-arm32

This file was deleted.

19 changes: 0 additions & 19 deletions Templates/ServerSentEvents/Dockerfile.linux-arm64

This file was deleted.

19 changes: 0 additions & 19 deletions Templates/ServerSentEvents/Dockerfile.linux-x64

This file was deleted.

2 changes: 1 addition & 1 deletion Templates/ServerSentEvents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ following commands in your terminal (and adjust the first line
depending on your platform).

```
docker build -f Dockerfile.linux-x64 -t $safeprojectname$ .
docker build -t $safeprojectname$ .
docker run -p 8080:8080 $safeprojectname$
```
Expand Down
19 changes: 19 additions & 0 deletions Templates/SinglePageApplication/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
ARG TARGETARCH
WORKDIR /source

COPY --link $safeprojectname$/*.csproj .
RUN dotnet restore -a $TARGETARCH

COPY --link $safeprojectname$/. .
RUN dotnet publish --no-restore -a $TARGETARCH -o /app

# Enable globalization and time zones:
# https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md

FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine
EXPOSE 8080
WORKDIR /app
COPY --link --from=build /app .
USER $APP_UID
ENTRYPOINT ["./$safeprojectname$"]
19 changes: 0 additions & 19 deletions Templates/SinglePageApplication/Dockerfile.linux-arm32

This file was deleted.

19 changes: 0 additions & 19 deletions Templates/SinglePageApplication/Dockerfile.linux-arm64

This file was deleted.

19 changes: 0 additions & 19 deletions Templates/SinglePageApplication/Dockerfile.linux-x64

This file was deleted.

2 changes: 1 addition & 1 deletion Templates/SinglePageApplication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ following commands in your terminal (and adjust the first line
depending on your platform).

```
docker build -f Dockerfile.linux-x64 -t $safeprojectname$ .
docker build -t $safeprojectname$ .
docker run -p 8080:8080 $safeprojectname$
```
Expand Down
19 changes: 19 additions & 0 deletions Templates/Webservice-Controllers/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
ARG TARGETARCH
WORKDIR /source

COPY --link $safeprojectname$/*.csproj .
RUN dotnet restore -a $TARGETARCH

COPY --link $safeprojectname$/. .
RUN dotnet publish --no-restore -a $TARGETARCH -o /app

# Enable globalization and time zones:
# https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md

FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine
EXPOSE 8080
WORKDIR /app
COPY --link --from=build /app .
USER $APP_UID
ENTRYPOINT ["./$safeprojectname$"]
19 changes: 0 additions & 19 deletions Templates/Webservice-Controllers/Dockerfile.linux-arm32

This file was deleted.

19 changes: 0 additions & 19 deletions Templates/Webservice-Controllers/Dockerfile.linux-arm64

This file was deleted.

19 changes: 0 additions & 19 deletions Templates/Webservice-Controllers/Dockerfile.linux-x64

This file was deleted.

2 changes: 1 addition & 1 deletion Templates/Webservice-Controllers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ following commands in your terminal (and adjust the first line
depending on your platform).

```
docker build -f Dockerfile.linux-x64 -t $safeprojectname$ .
docker build -t $safeprojectname$ .
docker run -p 8080:8080 $safeprojectname$
```
Expand Down
19 changes: 19 additions & 0 deletions Templates/Webservice-Minimal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
ARG TARGETARCH
WORKDIR /source

COPY --link $safeprojectname$/*.csproj .
RUN dotnet restore -a $TARGETARCH

COPY --link $safeprojectname$/. .
RUN dotnet publish --no-restore -a $TARGETARCH -o /app

# Enable globalization and time zones:
# https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md

FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine
EXPOSE 8080
WORKDIR /app
COPY --link --from=build /app .
USER $APP_UID
ENTRYPOINT ["./$safeprojectname$"]
19 changes: 0 additions & 19 deletions Templates/Webservice-Minimal/Dockerfile.linux-arm32

This file was deleted.

19 changes: 0 additions & 19 deletions Templates/Webservice-Minimal/Dockerfile.linux-arm64

This file was deleted.

19 changes: 0 additions & 19 deletions Templates/Webservice-Minimal/Dockerfile.linux-x64

This file was deleted.

2 changes: 1 addition & 1 deletion Templates/Webservice-Minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ following commands in your terminal (and adjust the first line
depending on your platform).

```
docker build -f Dockerfile.linux-x64 -t $safeprojectname$ .
docker build -t $safeprojectname$ .
docker run -p 8080:8080 $safeprojectname$
```
Expand Down
19 changes: 19 additions & 0 deletions Templates/Webservice/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
ARG TARGETARCH
WORKDIR /source

COPY --link $safeprojectname$/*.csproj .
RUN dotnet restore -a $TARGETARCH

COPY --link $safeprojectname$/. .
RUN dotnet publish --no-restore -a $TARGETARCH -o /app

# Enable globalization and time zones:
# https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md

FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine
EXPOSE 8080
WORKDIR /app
COPY --link --from=build /app .
USER $APP_UID
ENTRYPOINT ["./$safeprojectname$"]
19 changes: 0 additions & 19 deletions Templates/Webservice/Dockerfile.linux-arm32

This file was deleted.

Loading

0 comments on commit adcaceb

Please sign in to comment.