[docker] Run application in rootless mode (ISH-319)
All checks were successful
/ unit-tests (push) Successful in 26s
/ build-and-push (push) Successful in 1m55s

This commit is contained in:
Laura Hausmann 2024-05-06 15:34:04 +02:00
parent a17da9d526
commit 039d46477a
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

@ -48,6 +48,7 @@ RUN dotnet publish --no-restore -c Release -a $TARGETARCH -o /app -p:EnableAOT=t
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled AS image-aot
WORKDIR /app
COPY --from=builder-aot /app .
USER app
ENTRYPOINT ["./Iceshrimp.Backend", "--environment", "Production", "--migrate-and-start"]
# Enable globalization and time zones:
@ -56,4 +57,5 @@ ENTRYPOINT ["./Iceshrimp.Backend", "--environment", "Production", "--migrate-and
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine-composite AS image-jit
WORKDIR /app
COPY --from=builder-jit /app .
USER app
ENTRYPOINT ["./Iceshrimp.Backend", "--environment", "Production", "--migrate-and-start"]