Dockerfile 628 B

123456789101112131415161718192021222324
  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 addgroup -g 1000 gdp && \
  8. # adduser -h /home/gdp -D -u 1000 gdp && \
  9. RUN adduser -u 1000 -G users -s /bin/sh -D gdp
  10. # chown -R gdp:gdp /home/gdp
  11. USER gdp
  12. COPY ./bashrc /home/gdp/.bashrc
  13. COPY ./inputrc /home/gdp/.inputrc
  14. COPY ./client-entrypoint.sh /usr/local/bin
  15. USER root
  16. RUN chmod +x /usr/local/bin/client-entrypoint.sh
  17. USER gdp
  18. CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]