Use uniform UID (1000) + fix permission for tactical-frontend container

This commit is contained in:
Joel DeTeves 2022-01-17 01:11:59 -08:00
parent 4b577c9541
commit 006b20351e
1 changed files with 6 additions and 2 deletions

View File

@ -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