build: docker 镜像支持 NETCore 3.0
This commit is contained in:
parent
2d7cf3ded5
commit
c464ffe754
src/admin/Bootstrap.Admin
|
@ -1,11 +1,11 @@
|
|||
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
|
||||
#For more information, please see https://aka.ms/containercompat
|
||||
|
||||
FROM microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-1803 AS base
|
||||
FROM microsoft/dotnet:3.0-aspnetcore-runtime-nanoserver-1903 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.2-sdk-nanoserver-1803 AS build
|
||||
FROM microsoft/dotnet:3.0-sdk-nanoserver-1903 AS build
|
||||
WORKDIR /src
|
||||
COPY src/admin .
|
||||
|
||||
|
@ -16,7 +16,4 @@ RUN dotnet publish -c Release -o /app
|
|||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app .
|
||||
COPY --from=publish ["/src/Bootstrap.Admin/BootstrapAdmin.db", "."]
|
||||
COPY --from=publish ["/src/keys/Longbow.lic", "."]
|
||||
COPY --from=publish ["/src/keys/appsettings.Production.json", "."]
|
||||
ENTRYPOINT ["dotnet", "Bootstrap.Admin.dll"]
|
|
@ -1,11 +1,11 @@
|
|||
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
|
||||
#For more information, please see https://aka.ms/containercompat
|
||||
|
||||
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.2-sdk AS build
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.0 AS build
|
||||
WORKDIR /src
|
||||
COPY src/admin .
|
||||
|
||||
|
@ -16,7 +16,4 @@ RUN dotnet publish -c Release -o /app
|
|||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app .
|
||||
COPY --from=publish ["/src/Bootstrap.Admin/BootstrapAdmin.db", "."]
|
||||
COPY --from=publish ["/src/keys/Longbow.lic", "."]
|
||||
COPY --from=publish ["/src/keys/appsettings.Production.json", "."]
|
||||
ENTRYPOINT ["dotnet", "Bootstrap.Admin.dll"]
|
Loading…
Reference in New Issue