ci: lowered docker image size by half by using alpine linux
This commit is contained in:
parent
43c4eb6e4c
commit
abc467d1ea
10
Dockerfile
10
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"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user