File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,12 +16,16 @@ python --version
1616mkdir -p /app/data/logs
1717chmod -R 777 /app/data/logs
1818
19- # HACK(bacongobbler): explicitly add the docker socket to the deis group
20- chgrp deis /var/run/docker.sock
21-
22- # allow deis user group permission to Docker socket
23- groupadd -g " $( stat -c " %g" /var/run/docker.sock) " docker || true
24- usermod -a -G docker deis || true
19+ # modify deis user groups to grant access to Docker socket
20+ DOCKER_SOCKET_GID=$( stat -c " %g" /var/run/docker.sock)
21+ DOCKER_SOCKET_GROUP=$( getent group " $DOCKER_SOCKET_GID " | cut -d : -f 1 || :)
22+ if [[ -z " $DOCKER_SOCKET_GROUP " ]]; then
23+ DOCKER_SOCKET_GROUP=docker
24+ groupadd -g " $DOCKER_SOCKET_GID " " $DOCKER_SOCKET_GROUP "
25+ fi
26+ if [[ " $DOCKER_SOCKET_GROUP " != " deis" ]]; then
27+ usermod -a -G " $DOCKER_SOCKET_GROUP " deis
28+ fi
2529
2630echo " "
2731echo " Django checks:"
You can’t perform that action at this time.
0 commit comments