This repository was archived by the owner on Nov 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +8
-8
lines changed
azure-ansible/.devcontainer/library-scripts
azure-terraform/.devcontainer/library-scripts
codespaces-linux/.devcontainer/library-scripts
dapr-dotnet/.devcontainer/library-scripts
dapr-javascript-node/.devcontainer/library-scripts
docker-from-docker-compose/.devcontainer/library-scripts
docker-from-docker/.devcontainer/library-scripts
kubernetes-helm/.devcontainer/library-scripts Expand file tree Collapse file tree 8 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
283
283
# that we can set permissions on it without affecting the host.
284
284
if [ "${ENABLE_NONROOT_DOCKER} " = "true" ] && [ "${SOURCE_SOCKET} " != "${TARGET_SOCKET} " ] && [ "${USERNAME} " != "root" ] && [ "${USERNAME} " != "0" ]; then
285
285
SOCKET_GID=\$ (stat -c '%g' ${SOURCE_SOCKET} )
286
- if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ]; then
286
+ if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ] && ! grep -E ".+:x: \$ {SOCKET_GID}" /etc/group ; then
287
287
sudoIf groupmod --gid "\$ {SOCKET_GID}" docker
288
288
else
289
289
# Enable proxy if not already running
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
283
283
# that we can set permissions on it without affecting the host.
284
284
if [ "${ENABLE_NONROOT_DOCKER} " = "true" ] && [ "${SOURCE_SOCKET} " != "${TARGET_SOCKET} " ] && [ "${USERNAME} " != "root" ] && [ "${USERNAME} " != "0" ]; then
285
285
SOCKET_GID=\$ (stat -c '%g' ${SOURCE_SOCKET} )
286
- if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ]; then
286
+ if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ] && ! grep -E ".+:x: \$ {SOCKET_GID}" /etc/group ; then
287
287
sudoIf groupmod --gid "\$ {SOCKET_GID}" docker
288
288
else
289
289
# Enable proxy if not already running
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
283
283
# that we can set permissions on it without affecting the host.
284
284
if [ "${ENABLE_NONROOT_DOCKER} " = "true" ] && [ "${SOURCE_SOCKET} " != "${TARGET_SOCKET} " ] && [ "${USERNAME} " != "root" ] && [ "${USERNAME} " != "0" ]; then
285
285
SOCKET_GID=\$ (stat -c '%g' ${SOURCE_SOCKET} )
286
- if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ]; then
286
+ if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ] && ! grep -E ".+:x: \$ {SOCKET_GID}" /etc/group ; then
287
287
sudoIf groupmod --gid "\$ {SOCKET_GID}" docker
288
288
else
289
289
# Enable proxy if not already running
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
283
283
# that we can set permissions on it without affecting the host.
284
284
if [ "${ENABLE_NONROOT_DOCKER} " = "true" ] && [ "${SOURCE_SOCKET} " != "${TARGET_SOCKET} " ] && [ "${USERNAME} " != "root" ] && [ "${USERNAME} " != "0" ]; then
285
285
SOCKET_GID=\$ (stat -c '%g' ${SOURCE_SOCKET} )
286
- if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ]; then
286
+ if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ] && ! grep -E ".+:x: \$ {SOCKET_GID}" /etc/group ; then
287
287
sudoIf groupmod --gid "\$ {SOCKET_GID}" docker
288
288
else
289
289
# Enable proxy if not already running
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
283
283
# that we can set permissions on it without affecting the host.
284
284
if [ "${ENABLE_NONROOT_DOCKER} " = "true" ] && [ "${SOURCE_SOCKET} " != "${TARGET_SOCKET} " ] && [ "${USERNAME} " != "root" ] && [ "${USERNAME} " != "0" ]; then
285
285
SOCKET_GID=\$ (stat -c '%g' ${SOURCE_SOCKET} )
286
- if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ]; then
286
+ if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ] && ! grep -E ".+:x: \$ {SOCKET_GID}" /etc/group ; then
287
287
sudoIf groupmod --gid "\$ {SOCKET_GID}" docker
288
288
else
289
289
# Enable proxy if not already running
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
283
283
# that we can set permissions on it without affecting the host.
284
284
if [ "${ENABLE_NONROOT_DOCKER} " = "true" ] && [ "${SOURCE_SOCKET} " != "${TARGET_SOCKET} " ] && [ "${USERNAME} " != "root" ] && [ "${USERNAME} " != "0" ]; then
285
285
SOCKET_GID=\$ (stat -c '%g' ${SOURCE_SOCKET} )
286
- if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ]; then
286
+ if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ] && ! grep -E ".+:x: \$ {SOCKET_GID}" /etc/group ; then
287
287
sudoIf groupmod --gid "\$ {SOCKET_GID}" docker
288
288
else
289
289
# Enable proxy if not already running
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
283
283
# that we can set permissions on it without affecting the host.
284
284
if [ "${ENABLE_NONROOT_DOCKER} " = "true" ] && [ "${SOURCE_SOCKET} " != "${TARGET_SOCKET} " ] && [ "${USERNAME} " != "root" ] && [ "${USERNAME} " != "0" ]; then
285
285
SOCKET_GID=\$ (stat -c '%g' ${SOURCE_SOCKET} )
286
- if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ]; then
286
+ if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ] && ! grep -E ".+:x: \$ {SOCKET_GID}" /etc/group ; then
287
287
sudoIf groupmod --gid "\$ {SOCKET_GID}" docker
288
288
else
289
289
# Enable proxy if not already running
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
283
283
# that we can set permissions on it without affecting the host.
284
284
if [ "${ENABLE_NONROOT_DOCKER} " = "true" ] && [ "${SOURCE_SOCKET} " != "${TARGET_SOCKET} " ] && [ "${USERNAME} " != "root" ] && [ "${USERNAME} " != "0" ]; then
285
285
SOCKET_GID=\$ (stat -c '%g' ${SOURCE_SOCKET} )
286
- if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ]; then
286
+ if [ "\$ {SOCKET_GID}" != "0" ] && [ "\$ {SOCKET_GID}" != "${DOCKER_GID} " ] && ! grep -E ".+:x: \$ {SOCKET_GID}" /etc/group ; then
287
287
sudoIf groupmod --gid "\$ {SOCKET_GID}" docker
288
288
else
289
289
# Enable proxy if not already running
You can’t perform that action at this time.
0 commit comments