mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
23 lines
520 B
Plaintext
23 lines
520 B
Plaintext
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch as dev
|
|
|
|
RUN mkdir /work/
|
|
WORKDIR /work/
|
|
|
|
COPY ./src/work.csproj /work/work.csproj
|
|
RUN dotnet restore
|
|
|
|
COPY ./src/ /work/
|
|
RUN mkdir /out/
|
|
RUN dotnet publish --no-restore --output /out/ --configuration Release
|
|
|
|
|
|
###########START NEW IMAGE###########################################
|
|
|
|
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim as prod
|
|
|
|
RUN mkdir /app/
|
|
WORKDIR /app/
|
|
COPY --from=dev /out/ /app/
|
|
RUN chmod +x /app/
|
|
CMD dotnet work.dll
|