feat: add multistage release dockerbuilds
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
* this makes the whole thing self-sufficient - i.e. no more reliance on host's dotnet, everything is pulled during the build process * makefile has been updated to reflect this change so that the 'dockerbuild' target is no longer dependent on 'releasebuild' target
This commit is contained in:
parent
4b4e2c881a
commit
2cf282bb51
12
Dockerfile
12
Dockerfile
|
@ -1,6 +1,16 @@
|
|||
FROM mcr.microsoft.com/dotnet/core/sdk:2.1-alpine
|
||||
|
||||
COPY . /src
|
||||
WORKDIR /src
|
||||
RUN sed -i 's/2.1.519/2.1.811/' global.json
|
||||
RUN dotnet --version && dotnet --info
|
||||
RUN dotnet clean
|
||||
RUN dotnet restore
|
||||
RUN dotnet build -c Release
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:2.1
|
||||
|
||||
COPY bin/Release/netcoreapp2.1/publish/ App/
|
||||
COPY --from=0 /src/bin/Release/netcoreapp2.1/publish/ App/
|
||||
WORKDIR /App
|
||||
ENV ASPNETCORE_ENVIRONMENT=Release
|
||||
ENTRYPOINT ["dotnet", "pwt-0x01-ng.dll"]
|
||||
|
|
Reference in New Issue