2018-03-06 10:59:40 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-02-19 10:32:50 +00:00
|
|
|
docker --version >&2
|
2019-04-21 23:38:24 +00:00
|
|
|
|
2020-02-19 11:06:28 +00:00
|
|
|
# add the node user to the docker group on the host
|
2019-04-21 23:38:24 +00:00
|
|
|
DOCKER_GROUP=$(stat -c '%g' /var/run/docker.sock)
|
|
|
|
groupadd --non-unique --gid ${DOCKER_GROUP} dockeronhost
|
|
|
|
usermod -aG dockeronhost node
|
2018-03-16 17:30:11 +00:00
|
|
|
|
2020-02-19 11:06:28 +00:00
|
|
|
# compatibility: initial volume setup
|
2021-02-18 15:09:48 +00:00
|
|
|
mkdir -p /app/cache && chown node:node /app/cache
|
|
|
|
mkdir -p /app/compiles && chown node:node /app/compiles
|
|
|
|
mkdir -p /app/db && chown node:node /app/db
|
2021-02-18 15:33:16 +00:00
|
|
|
mkdir -p /app/output && chown node:node /app/output
|
2018-03-16 17:30:11 +00:00
|
|
|
|
2020-02-19 11:06:28 +00:00
|
|
|
# make synctex available for remount in compiles
|
2020-03-11 11:06:46 +00:00
|
|
|
cp /app/bin/synctex /app/bin/synctex-mount/synctex
|
|
|
|
|
2019-01-15 11:29:04 +00:00
|
|
|
exec runuser -u node -- "$@"
|