Dockerfile 627 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 offline
  10. # chown -R gdp:gdp /home/gdp
  11. USER offline
  12. COPY ./bashrc /home/offline/.bashrc
  13. COPY ./inputrc /home/offline/.inputrc
  14. COPY ./entrypoint.sh /usr/local/bin
  15. USER root
  16. RUN chmod +x /usr/local/bin/entrypoint.sh
  17. USER offline
  18. CMD ["/bin/sh","/usr/local/bin/entrypoint.sh"]