Dockerfile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM node:lts-bullseye
  2. # THE ALL USER THINGS IS USELESS AS NODE IS ALREADY A USER @ 1000
  3. # RUN find / -group 1000 -exec chgrp -h node {} \;
  4. # RUN find / -user 1000 -exec chown -h node {} \;
  5. # ARG USER_UID
  6. # ARG USER_UNAME
  7. # ARG USER_GID
  8. # ARG USER_GNAME
  9. # # RUN addgroup -g 1000 gdp && \
  10. # # adduser -h /home/gdp -D -u 1000 gdp && \
  11. # RUN adduser -u ${USER_UID} -G users -s /bin/sh -D ${USER_UNAME}
  12. # # chown -R gdp:gdp /home/gdp
  13. # RUN if getent group ${USER_GNAME} ; then groupdel ${USER_GNAME}; fi
  14. # RUN groupadd -g ${USER_GID} ${USER_GNAME}
  15. # RUN useradd -l -u ${USER_UID} -g ${USER_GNAME} ${USER_UNAME}
  16. # RUN install -d -m 0755 -o ${USER_UNAME} -g ${USER_GNAME} /home/${USER_UNAME}
  17. # RUN chown --changes --silent --no-dereference --recursive \
  18. # --from=33:33 ${USER_UID}:${USER_GID} \
  19. # /home/${USER_UNAME}
  20. # USER ${USER_UNAME}
  21. # COPY ./bashrc /home/${USER_UNAME}/.bashrc
  22. # COPY ./inputrc /home/${USER_UNAME}/.inputrc
  23. # COPY ./bashrc /home/node/.bashrc # should do an echo in already existing /home/node/.bashcr
  24. COPY ./inputrc /home/node/.inputrc
  25. COPY ./client-entrypoint.sh /usr/local/bin
  26. # USER root
  27. RUN chmod +x /usr/local/bin/client-entrypoint.sh
  28. # USER ${USER_UNAME}
  29. CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]