Use uniform UID (1000) + fix permission for tactical-frontend container
This commit is contained in:
parent
4b577c9541
commit
006b20351e
|
@ -21,16 +21,20 @@ ENV PUBLIC_DIR /usr/share/nginx/html
|
||||||
|
|
||||||
USER root
|
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
|
RUN apk add --no-cache bash
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
|
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
COPY --from=builder /home/node/app/dist/ ${PUBLIC_DIR}
|
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/
|
COPY docker/containers/tactical-frontend/entrypoint.sh /docker-entrypoint.d/
|
||||||
RUN chmod +x /docker-entrypoint.d/entrypoint.sh
|
RUN chmod +x /docker-entrypoint.d/entrypoint.sh
|
||||||
|
|
||||||
RUN chown -R nginx:nginx /usr/share/nginx/html
|
|
||||||
|
|
||||||
USER nginx
|
USER nginx
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
Loading…
Reference in New Issue