Dockerfile 721 B

1234567891011121314151617181920212223242526272829
  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. ARG UID=1000
  6. ARG UNAME=gdp
  7. ARG GID=1000
  8. ARG GNAME=users
  9. #RUN find / -group ${UID} -exec chgrp -h node {} \;
  10. #RUN find / -user ${UID} -exec chown -h node {} \;
  11. RUN addgroup -g ${DID} ${GNAME}
  12. # adduser -h /home/gdp -D -u 1000 gdp && \
  13. RUN adduser -u ${UID} -G ${GNAME} -s /bin/sh -D ${UNAME}
  14. # chown -R gdp:gdp /home/gdp
  15. USER ${UNAME}
  16. COPY ./bashrc /home/${UNAME}/.bashrc
  17. COPY ./inputrc /home/${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 ${UNAME}
  22. CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]