From 0c9f2ceb66e445bdcfc5c0b4243c828da7b6fe58 Mon Sep 17 00:00:00 2001 From: Sergey Ustimenko Date: Sat, 10 Feb 2024 14:12:58 +0100 Subject: [PATCH] Dockerfile sass fix and nuget packages cache --- TemporalAirlinesConcept.Web/Dockerfile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/TemporalAirlinesConcept.Web/Dockerfile b/TemporalAirlinesConcept.Web/Dockerfile index f9cae57..255a3ed 100644 --- a/TemporalAirlinesConcept.Web/Dockerfile +++ b/TemporalAirlinesConcept.Web/Dockerfile @@ -9,19 +9,21 @@ EXPOSE 5166 FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG BUILD_CONFIGURATION=Release -RUN apt update && apt install -y curl bash +RUN apt update && apt install -y curl && apt clean -RUN mkdir -p tmp && cd tmp && \ - curl -L -o sass_package.tar.gz https://github.com/sass/dart-sass/releases/download/1.55.0/dart-sass-1.55.0-linux-x64.tar.gz && \ - tar -xvf ./sass_package.tar.gz && \ - ls -la dart-sass && \ - cp dart-sass/sass /usr/bin/ && ls -la /usr/bin && /usr/bin/sass --version && \ - chmod +x /usr/bin/sass && \ - cd - && rm -Rf tmp +RUN curl -L -o sass_package.tar.gz https://github.com/sass/dart-sass/releases/download/1.55.0/dart-sass-1.55.0-linux-x64.tar.gz +RUN tar -xvf sass_package.tar.gz +RUN ls -la dart-sass +RUN cp dart-sass/sass /usr/bin/ && /usr/bin/sass --version +RUN chmod +x /usr/bin/sass +RUN rm -Rf dart-sass sass_package.tar.gz WORKDIR /src -COPY ["TemporalAirlinesConcept.Web/TemporalAirlinesConcept.Web.csproj", "TemporalAirlinesConcept.Web/"] +COPY ["TemporalAirlinesConcept.Configuration/TemporalAirlinesConcept.Configuration.csproj", "TemporalAirlinesConcept.Configuration/"] +COPY ["TemporalAirlinesConcept.DAL/TemporalAirlinesConcept.DAL.csproj", "TemporalAirlinesConcept.DAL/"] +COPY ["TemporalAirlinesConcept.Services/TemporalAirlinesConcept.Services.csproj", "TemporalAirlinesConcept.Services/"] COPY ["TemporalAirlinesConcept.Common/TemporalAirlinesConcept.Common.csproj", "TemporalAirlinesConcept.Common/"] +COPY ["TemporalAirlinesConcept.Web/TemporalAirlinesConcept.Web.csproj", "TemporalAirlinesConcept.Web/"] RUN dotnet restore "./TemporalAirlinesConcept.Web/TemporalAirlinesConcept.Web.csproj" COPY . . WORKDIR "/src/TemporalAirlinesConcept.Web"