[PHP-FPM] Include Docker api for better SOGo status handling and future changes
parent
6f91d094e2
commit
9b4ed6b21c
|
@ -82,4 +82,16 @@ if [[ ! -z ${DOMAIN_ARRAY} ]]; then
|
|||
done
|
||||
fi
|
||||
|
||||
# Socket access
|
||||
DOCKER_SOCKET=/var/run/docker.sock
|
||||
DOCKER_GROUP=docker
|
||||
REGULAR_USER=www-data
|
||||
|
||||
if [ -S ${DOCKER_SOCKET} ]; then
|
||||
DOCKER_GID=$(stat -c '%g' ${DOCKER_SOCKET})
|
||||
delgroup $(stat -c '%G' ${DOCKER_SOCKET})
|
||||
addgroup -g ${DOCKER_GID} ${DOCKER_GROUP}
|
||||
adduser ${REGULAR_USER} ${DOCKER_GROUP}
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
|
Loading…
Reference in New Issue