mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-01-24 16:34:40 +08:00
[PHP-FPM] Include Docker api for better SOGo status handling and future changes
This commit is contained in:
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
Block a user