overleaf/services/clsi/entrypoint.sh
Jakob Ackermann 5b1481fc12 [docker] add support for a different docker group id on the docker host
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-04-23 01:53:40 +02:00

25 lines
586 B
Bash
Executable file

#!/bin/sh
echo "Changing permissions of /var/run/docker.sock for sibling containers"
ls -al /var/run/docker.sock
docker --version
cat /etc/passwd
DOCKER_GROUP=$(stat -c '%g' /var/run/docker.sock)
groupadd --non-unique --gid ${DOCKER_GROUP} dockeronhost
usermod -aG dockeronhost node
mkdir -p /app/cache
chown -R node:node /app/cache
mkdir -p /app/compiles
chown -R node:node /app/compiles
chown -R node:node /app/bin/synctex
mkdir -p /app/test/acceptance/fixtures/tmp/
chown -R node:node /app
chown -R node:node /app/bin
./bin/install_texlive_gce.sh
exec runuser -u node -- "$@"