From 006b20351e906c413e0c9ccaea2cffc555be12a5 Mon Sep 17 00:00:00 2001 From: Joel DeTeves Date: Mon, 17 Jan 2022 01:11:59 -0800 Subject: [PATCH] Use uniform UID (1000) + fix permission for tactical-frontend container --- docker/containers/tactical-frontend/dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docker/containers/tactical-frontend/dockerfile b/docker/containers/tactical-frontend/dockerfile index 658c383c..31dd981a 100644 --- a/docker/containers/tactical-frontend/dockerfile +++ b/docker/containers/tactical-frontend/dockerfile @@ -21,16 +21,20 @@ ENV PUBLIC_DIR /usr/share/nginx/html USER root +RUN deluser --remove-home nginx \ + && addgroup -S nginx -g 1000 \ + && adduser -S -G nginx -u 1000 nginx + RUN apk add --no-cache bash + SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] COPY --from=builder /home/node/app/dist/ ${PUBLIC_DIR} +RUN chown -R nginx:nginx /etc/nginx && chown -R nginx:nginx ${PUBLIC_DIR} COPY docker/containers/tactical-frontend/entrypoint.sh /docker-entrypoint.d/ RUN chmod +x /docker-entrypoint.d/entrypoint.sh -RUN chown -R nginx:nginx /usr/share/nginx/html - USER nginx EXPOSE 8080