From abc467d1eaf326421d1c016bd8de556394866546 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Thu, 19 Jun 2025 23:50:48 +0300 Subject: [PATCH] ci: lowered docker image size by half by using alpine linux --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7669bb5..fc413f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,14 +3,14 @@ FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build WORKDIR /App COPY . ./ -RUN apt update - RUN dotnet restore -RUN dotnet publish Platforms/Server -c Release -o out +RUN dotnet publish Platforms/Server -c Release -r linux-musl-x64 --self-contained true -o out -FROM mcr.microsoft.com/dotnet/runtime:9.0 +FROM alpine:latest WORKDIR /App COPY --from=build /App/out . -ENTRYPOINT ["dotnet", "Server.dll"] +RUN apk add --no-cache icu-libs + +ENTRYPOINT ["./Server"]