From e938784388e47a839b397346ad543c24061cd386 Mon Sep 17 00:00:00 2001 From: glax Date: Tue, 6 Jun 2023 22:11:26 +0200 Subject: [PATCH] Created own base image for tranga-api (to stop apt always updating) --- Dockerfile | 4 ++-- Dockerfile-base | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 Dockerfile-base diff --git a/Dockerfile b/Dockerfile index 9b169dd..b4fea12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,9 @@ COPY . /src/ RUN dotnet restore Tranga-API/Tranga-API.csproj RUN dotnet publish -c Release -o /publish -FROM mcr.microsoft.com/dotnet/aspnet:7.0 as runtime +#FROM mcr.microsoft.com/dotnet/aspnet:7.0 as runtime +FROM glax/tranga-base:latest as runtime WORKDIR /publish COPY --from=build-env /publish . EXPOSE 80 -RUN apt-get update && apt-get install -y libx11-6 libx11-xcb1 libatk1.0-0 libgtk-3-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2 libxshmfence1 libnss3 ENTRYPOINT ["dotnet", "/publish/Tranga-API.dll"] diff --git a/Dockerfile-base b/Dockerfile-base new file mode 100644 index 0000000..24ff1aa --- /dev/null +++ b/Dockerfile-base @@ -0,0 +1,4 @@ +# syntax=docker/dockerfile:1 +FROM mcr.microsoft.com/dotnet/aspnet:7.0 as runtime +WORKDIR /publish +RUN apt-get update && apt-get install -y libx11-6 libx11-xcb1 libatk1.0-0 libgtk-3-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2 libxshmfence1 libnss3