Dockerfile 743 B

123456789101112131415161718192021222324252627282930
  1. FROM node:lts-alpine
  2. RUN apk update && apk --no-cache add shadow && \
  3. usermod -u 1001 node && \
  4. groupmod -g 1001 node
  5. RUN find / -group 1000 -exec chgrp -h node {} \;
  6. RUN find / -user 1000 -exec chown -h node {} \;
  7. ARG USER_UID
  8. ARG USER_UNAME
  9. ARG USER_GID
  10. ARG USER_GNAME
  11. # RUN addgroup -g 1000 gdp && \
  12. # adduser -h /home/gdp -D -u 1000 gdp && \
  13. RUN adduser -u ${USER_UID} -G users -s /bin/sh -D ${USER_UNAME}
  14. # chown -R gdp:gdp /home/gdp
  15. USER ${USER_UNAME}
  16. COPY ./bashrc /home/${USER_UNAME}/.bashrc
  17. COPY ./inputrc /home/${USER_UNAME}/.inputrc
  18. COPY ./client-entrypoint.sh /usr/local/bin
  19. USER root
  20. RUN chmod +x /usr/local/bin/client-entrypoint.sh
  21. USER ${USER_UNAME}
  22. CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]