-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7cf01d8
commit 56f6d1d
Showing
77 changed files
with
29,018 additions
and
29,097 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
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 |
---|---|---|
@@ -1,19 +1,17 @@ | ||
# https://hub.docker.com/_/microsoft-dotnet | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build | ||
WORKDIR /source | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY *.sln . | ||
COPY aspnetapp/*.csproj ./aspnetapp/ | ||
RUN dotnet restore | ||
COPY aspnetapp/*.csproj . | ||
RUN dotnet restore --use-current-runtime | ||
|
||
# copy everything else and build app | ||
COPY aspnetapp/. ./aspnetapp/ | ||
WORKDIR /source/aspnetapp | ||
RUN dotnet publish -c release -o /app --no-restore | ||
COPY aspnetapp/. . | ||
RUN dotnet publish -c Release -o /app --use-current-runtime --self-contained false --no-restore | ||
|
||
# final stage/image | ||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 | ||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 | ||
WORKDIR /app | ||
COPY --from=build /app ./ | ||
COPY --from=build /app . | ||
ENTRYPOINT ["dotnet", "aspnetapp.dll"] |
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
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
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,17 @@ | ||
# https://hub.docker.com/_/microsoft-dotnet | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0-jammy AS build | ||
WORKDIR /source | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY aspnetapp/*.csproj . | ||
RUN dotnet restore --use-current-runtime | ||
|
||
# copy everything else and build app | ||
COPY aspnetapp/. . | ||
RUN dotnet publish -c Release -o /app --use-current-runtime --self-contained false --no-restore | ||
|
||
# final stage/image | ||
FROM mcr.microsoft.com/dotnet/nightly/aspnet:7.0-jammy-chiseled | ||
WORKDIR /app | ||
COPY --from=build /app . | ||
ENTRYPOINT ["dotnet", "aspnetapp.dll"] |
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 |
---|---|---|
@@ -1,19 +1,17 @@ | ||
# https://hub.docker.com/_/microsoft-dotnet | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build | ||
WORKDIR /source | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY *.sln . | ||
COPY aspnetapp/*.csproj ./aspnetapp/ | ||
RUN dotnet restore -r linux-arm | ||
COPY aspnetapp/*.csproj . | ||
RUN dotnet restore -r linux-arm | ||
|
||
# copy everything else and build app | ||
COPY aspnetapp/. ./aspnetapp/ | ||
WORKDIR /source/aspnetapp | ||
RUN dotnet publish -c release -o /app -r linux-arm --self-contained false --no-restore | ||
COPY aspnetapp/. . | ||
RUN dotnet publish -c Release -o /app -r linux-arm --self-contained false --no-restore | ||
|
||
# final stage/image | ||
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim-arm32v7 | ||
FROM mcr.microsoft.com/dotnet/aspnet:7.0-bullseye-slim-arm32v7 | ||
WORKDIR /app | ||
COPY --from=build /app ./ | ||
COPY --from=build /app . | ||
ENTRYPOINT ["./aspnetapp"] |
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 |
---|---|---|
@@ -1,19 +1,17 @@ | ||
# https://hub.docker.com/_/microsoft-dotnet | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build | ||
WORKDIR /source | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY *.sln . | ||
COPY aspnetapp/*.csproj ./aspnetapp/ | ||
RUN dotnet restore -r linux-arm64 | ||
COPY aspnetapp/*.csproj . | ||
RUN dotnet restore -r linux-arm64 | ||
|
||
# copy everything else and build app | ||
COPY aspnetapp/. ./aspnetapp/ | ||
WORKDIR /source/aspnetapp | ||
RUN dotnet publish -c release -o /app -r linux-arm64 --self-contained false --no-restore | ||
COPY aspnetapp/. . | ||
RUN dotnet publish -c Release -o /app -r linux-arm64 --self-contained false --no-restore | ||
|
||
# final stage/image | ||
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim-arm64v8 | ||
FROM mcr.microsoft.com/dotnet/aspnet:7.0-bullseye-slim-arm64v8 | ||
WORKDIR /app | ||
COPY --from=build /app ./ | ||
COPY --from=build /app . | ||
ENTRYPOINT ["./aspnetapp"] |
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 |
---|---|---|
@@ -1,19 +1,17 @@ | ||
# https://hub.docker.com/_/microsoft-dotnet | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build | ||
WORKDIR /source | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY *.sln . | ||
COPY aspnetapp/*.csproj ./aspnetapp/ | ||
RUN dotnet restore -r linux-x64 | ||
COPY aspnetapp/*.csproj . | ||
RUN dotnet restore -r linux-x64 | ||
|
||
# copy everything else and build app | ||
COPY aspnetapp/. ./aspnetapp/ | ||
WORKDIR /source/aspnetapp | ||
RUN dotnet publish -c release -o /app -r linux-x64 --self-contained false --no-restore | ||
COPY aspnetapp/. . | ||
RUN dotnet publish -c Release -o /app -r linux-x64 --self-contained false --no-restore | ||
|
||
# final stage/image | ||
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim-amd64 | ||
FROM mcr.microsoft.com/dotnet/aspnet:7.0-bullseye-slim-amd64 | ||
WORKDIR /app | ||
COPY --from=build /app ./ | ||
COPY --from=build /app . | ||
ENTRYPOINT ["./aspnetapp"] |
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 |
---|---|---|
@@ -1,19 +1,17 @@ | ||
# https://hub.docker.com/_/microsoft-dotnet | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build | ||
WORKDIR /source | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY *.sln . | ||
COPY aspnetapp/*.csproj ./aspnetapp/ | ||
RUN dotnet restore -r linux-x64 /p:PublishReadyToRun=true | ||
COPY aspnetapp/*.csproj . | ||
RUN dotnet restore -r linux-x64 /p:PublishReadyToRun=true | ||
|
||
# copy everything else and build app | ||
COPY aspnetapp/. ./aspnetapp/ | ||
WORKDIR /source/aspnetapp | ||
RUN dotnet publish -c release -o /app -r linux-x64 --self-contained true --no-restore /p:PublishTrimmed=true /p:PublishReadyToRun=true /p:PublishSingleFile=true | ||
COPY aspnetapp/. . | ||
RUN dotnet publish -c Release -o /app -r linux-x64 --self-contained true --no-restore /p:PublishTrimmed=true /p:PublishReadyToRun=true /p:PublishSingleFile=true | ||
|
||
# final stage/image | ||
FROM mcr.microsoft.com/dotnet/runtime-deps:6.0-bullseye-slim-amd64 | ||
FROM mcr.microsoft.com/dotnet/runtime-deps:7.0-bullseye-slim-amd64 | ||
WORKDIR /app | ||
COPY --from=build /app ./ | ||
COPY --from=build /app . | ||
ENTRYPOINT ["./aspnetapp"] |
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 |
---|---|---|
@@ -1,22 +1,19 @@ | ||
# https://hub.docker.com/_/microsoft-dotnet | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build | ||
WORKDIR /source | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY *.sln . | ||
COPY aspnetapp/*.csproj ./aspnetapp/ | ||
RUN dotnet restore -r win-x64 | ||
COPY aspnetapp/*.csproj . | ||
RUN dotnet restore -r win-x64 | ||
|
||
# copy everything else and build app | ||
COPY aspnetapp/. ./aspnetapp/ | ||
WORKDIR /source/aspnetapp | ||
RUN dotnet publish -c release -o /app -r win-x64 --self-contained false --no-restore | ||
COPY aspnetapp/. . | ||
RUN dotnet publish -c Release -o /app -r win-x64 --self-contained false --no-restore | ||
|
||
# final stage/image | ||
# Relies on 6.0 multi-arch tag to pick the same Windows version as the host. | ||
# Relies on 7.0 multi-arch tag to pick the same Windows version as the host. | ||
# Alternatively, a release specific tag can be used, like: `6.0-nanoserver-ltsc2022` | ||
# Other versions are 20H2 and 1809 (in place of the `ltsc2022` substring above) | ||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 | ||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 | ||
WORKDIR /app | ||
COPY --from=build /app ./ | ||
ENTRYPOINT ["aspnetapp"] |
Oops, something went wrong.