From 150ec0e1d7842719e825e6f9fdcf9e70d03102f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Henrique=20Ivanchechen?= Date: Tue, 29 Aug 2023 16:05:19 -0300 Subject: [PATCH] docer --- ASP.NET/Dockerfile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/ASP.NET/Dockerfile b/ASP.NET/Dockerfile index 53f8b10..1ed48d2 100644 --- a/ASP.NET/Dockerfile +++ b/ASP.NET/Dockerfile @@ -2,6 +2,7 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build-env WORKDIR /App # Copy everything +RUN apt update && apt install wget -y COPY * . # Restore as distinct layers @@ -10,6 +11,16 @@ RUN dotnet restore # Build a release RUN dotnet build -c Release -o out +RUN cd out && \ + wget https://files.ivanch.me/api/public/dl/QFCLgtrG/simpleimage.png && \ + wget https://files.ivanch.me/api/public/dl/E0VLgWbx/bigimage.png && \ + wget https://files.ivanch.me/api/public/dl/nTAYqZwD/video.mp4 && \ + rm -rf runtimes && \ + mkdir -p ./static && \ + cp simpleimage.png ./static && \ + cp bigimage.png ./static && \ + mv video.mp4 ./static + # Build runtime image FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim @@ -17,13 +28,4 @@ WORKDIR /App COPY --from=build-env /App/out . -RUN apt update && apt install wget -y && \ - wget https://files.ivanch.me/api/public/dl/QFCLgtrG/simpleimage.png && \ - wget https://files.ivanch.me/api/public/dl/E0VLgWbx/bigimage.png && \ - wget https://files.ivanch.me/api/public/dl/nTAYqZwD/video.mp4 && \ - rm -rf runtimes && \ - cp simpleimage.png ./static && \ - cp bigimage.png ./static && \ - mv video.mp4 ./static - ENTRYPOINT ["dotnet", "/App/TCC.APP.dll"] \ No newline at end of file