entrypoint.sh 594 B

12345678910111213141516171819
  1. #!/bin/sh
  2. docker --version >&2
  3. # add the node user to the docker group on the host
  4. DOCKER_GROUP=$(stat -c '%g' /var/run/docker.sock)
  5. groupadd --non-unique --gid ${DOCKER_GROUP} dockeronhost
  6. usermod -aG dockeronhost node
  7. # compatibility: initial volume setup
  8. mkdir -p /app/cache && chown node:node /app/cache
  9. mkdir -p /app/compiles && chown node:node /app/compiles
  10. mkdir -p /app/db && chown node:node /app/db
  11. mkdir -p /app/output && chown node:node /app/output
  12. # make synctex available for remount in compiles
  13. cp /app/bin/synctex /app/bin/synctex-mount/synctex
  14. exec runuser -u node -- "$@"