You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo "**** docker and docker-compose already installed, skipping ****"
14
+
fi
15
+
16
+
if [ -S /var/run/docker.sock ]; then
17
+
DOCKER_GID=$(stat -c '%g' "/var/run/docker.sock")
18
+
if id -G abc | grep -qw "$DOCKER_GID"; then
19
+
exit 0
20
+
else
21
+
DOCKER_NAME=$(getent group "${DOCKER_GID}" | awk -F: '{print $1}')
22
+
if [ -z "${DOCKER_NAME}" ]; then
23
+
DOCKER_NAME="dockergroup"
24
+
groupadd -g "${DOCKER_GID}" "${DOCKER_NAME}"
25
+
fi
26
+
usermod -aG "${DOCKER_NAME}" abc
27
+
fi
28
+
elif [ -n "$DOCKER_HOST" ]; then
29
+
echo "**** Remote docker service $DOCKER_HOST will be used ****"
30
+
else
31
+
echo "**** Please map /var/run/docker.sock for access to docker service on host. Alternatively you can manually define a remote host address with the docker cli option -H ****"
0 commit comments