Files
ServiceUpdater/Dockerfile
Leon Hoppe a341b9cfda
All checks were successful
Updater CI/CD / publish (push) Successful in 2m18s
Implemented update functionallity
2026-02-24 18:49:23 +01:00

27 lines
775 B
Docker

FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
RUN apt-get update && apt-get install -y --no-install-recommends \
clang \
zlib1g-dev \
libc6-dev \
&& rm -rf /var/lib/apt/lists/*
COPY . .
RUN dotnet publish ServiceUpdater.csproj \
-c Release \
-o /app/publish \
-p:PublishAot=true \
-p:StripSymbols=true \
-p:InvariantGlobalization=true \
-r linux-x64 \
--self-contained true
FROM debian:bookworm-slim AS final
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
docker.io \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /app/publish/ServiceUpdater /app
COPY --from=build /app/publish/appsettings.json /app
RUN chmod +x /app/ServiceUpdater
ENTRYPOINT ["/app/ServiceUpdater"]