-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply recommended docker image layout (#20)
- Loading branch information
1 parent
7ad6a8d
commit d2702a5
Showing
36 changed files
with
210 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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$"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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$"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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$"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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$"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.