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

21 lines
455 B
Docker
Raw Normal View History

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
ENV UID 1000
ENV GID 1000
ENV UNAME unpriv
RUN adduser -D -u ${UID} -g ${GID} -H ${UNAME} -h /src
WORKDIR /src
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o bin/out
2020-11-26 00:24:36 +01:00
FROM mcr.microsoft.com/dotnet/aspnet:3.1
2020-11-26 00:24:36 +01:00
WORKDIR /App
COPY --from=0 /src/bin/out/ .
RUN chown -R ${UID}:${GID} ./
USER ${UNAME}
2020-11-26 00:24:36 +01:00
ENV ASPNETCORE_ENVIRONMENT=Release
ENTRYPOINT ["dotnet", "pwt-0x01-ng.dll"]