Switch nginx to one that doesn't need root

This commit is contained in:
Gavin Mogan 2024-03-03 22:49:03 -08:00 committed by GitHub
parent f56758e1c4
commit 2d66097584
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,6 +13,8 @@ COPY config.* /app/
RUN flutter pub get
RUN flutter build web --dart-define=FLUTTER_WEB_CANVASKIT_URL=canvaskit/ --release --source-maps
FROM docker.io/nginx:alpine
FROM docker.io/nginxinc/nginx-unprivileged:alpine
USER root
RUN rm -rf /usr/share/nginx/html
COPY --from=builder /app/build/web /usr/share/nginx/html
USER $UID