ci: lowered docker image size by half by using alpine linux

This commit is contained in:
Syntriax 2025-06-19 23:50:48 +03:00
parent 43c4eb6e4c
commit abc467d1ea

View File

@ -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"]