This repository has been archived on 2023-10-28. You can view files and clone it, but cannot push or open issues or pull requests.
pwt-0x01-ng/Dockerfile
surtur 98d2bba7b5
Some checks failed
continuous-integration/drone/push Build is failing
include bundles in prod version of the app
update Dockerfile
update _Layout
2021-02-23 15:45:58 +01:00

29 lines
631 B
Docker

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS base
# deps
RUN apk --no-cache add make git nodejs npm
WORKDIR /src
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN make webpack
RUN dotnet publish -c Release -o bin/out
FROM mcr.microsoft.com/dotnet/aspnet:3.1-alpine
WORKDIR /App
COPY --from=base /src/bin/out/ .
COPY --from=base /src/public/js/ ./wwwroot/js/
COPY --from=base /src/public/css/ ./wwwroot/css/
COPY --from=base /src/public/fonts/ ./wwwroot/fonts/
RUN chown -R nobody:nobody ./
USER nobody
ENV ASPNETCORE_ENVIRONMENT Production
ENV ASPNETCORE_URLS http://*:8081
ENTRYPOINT ["dotnet", "pwt-0x01-ng.dll"]