Dockerfile 785 B

12345678910111213141516171819202122232425262728293031323334
  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. RUN apk add --no-cache openssh sshpass
  8. ARG USER_UID
  9. ARG USER_UNAME
  10. ARG USER_GID
  11. ARG USER_GNAME
  12. # RUN addgroup -g 1000 gdp && \
  13. # adduser -h /home/gdp -D -u 1000 gdp && \
  14. RUN adduser -u ${USER_UID} -G users -s /bin/sh -D ${USER_UNAME}
  15. # chown -R gdp:gdp /home/gdp
  16. USER ${USER_UNAME}
  17. COPY ./bashrc /home/${USER_UNAME}/.bashrc
  18. COPY ./inputrc /home/${USER_UNAME}/.inputrc
  19. COPY ./client-entrypoint.sh /usr/local/bin
  20. USER root
  21. RUN chmod +x /usr/local/bin/client-entrypoint.sh
  22. USER ${USER_UNAME}
  23. CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]