Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 53c48f6

Browse files
author
CI
committed
Automated update for script library changes
1 parent 8417f21 commit 53c48f6

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

containers/azure-ansible/.devcontainer/library-scripts/docker-debian.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ fi
227227

228228
# Add a stub if not adding non-root user access, user is root
229229
if [ "${ENABLE_NONROOT_DOCKER}" = "false" ] || [ "${USERNAME}" = "root" ]; then
230-
echo '/usr/bin/env bash -c "\$@"' > /usr/local/share/docker-init.sh
230+
echo -e '#!/usr/bin/env bash\nexec "$@"' > /usr/local/share/docker-init.sh
231231
chmod +x /usr/local/share/docker-init.sh
232232
exit 0
233233
fi
@@ -284,7 +284,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
284284
if [ "${ENABLE_NONROOT_DOCKER}" = "true" ] && [ "${SOURCE_SOCKET}" != "${TARGET_SOCKET}" ] && [ "${USERNAME}" != "root" ] && [ "${USERNAME}" != "0" ]; then
285285
SOCKET_GID=\$(stat -c '%g' ${SOURCE_SOCKET})
286286
if [ "\${SOCKET_GID}" != "0" ] && [ "\${SOCKET_GID}" != "${DOCKER_GID}" ]; then
287-
sudoIf groupmod --gid "\${SOCKET_GID}" "${USERNAME}"
287+
sudoIf groupmod --gid "\${SOCKET_GID}" docker
288288
else
289289
# Enable proxy if not already running
290290
if [ ! -f "\${SOCAT_PID}" ] || ! ps -p \$(cat \${SOCAT_PID}) > /dev/null; then
@@ -306,4 +306,4 @@ exec "\$@"
306306
EOF
307307
chmod +x /usr/local/share/docker-init.sh
308308
chown ${USERNAME}:root /usr/local/share/docker-init.sh
309-
echo "Done!"
309+
echo "Done!"

containers/azure-terraform/.devcontainer/library-scripts/docker-debian.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ fi
227227

228228
# Add a stub if not adding non-root user access, user is root
229229
if [ "${ENABLE_NONROOT_DOCKER}" = "false" ] || [ "${USERNAME}" = "root" ]; then
230-
echo '/usr/bin/env bash -c "\$@"' > /usr/local/share/docker-init.sh
230+
echo -e '#!/usr/bin/env bash\nexec "$@"' > /usr/local/share/docker-init.sh
231231
chmod +x /usr/local/share/docker-init.sh
232232
exit 0
233233
fi
@@ -284,7 +284,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
284284
if [ "${ENABLE_NONROOT_DOCKER}" = "true" ] && [ "${SOURCE_SOCKET}" != "${TARGET_SOCKET}" ] && [ "${USERNAME}" != "root" ] && [ "${USERNAME}" != "0" ]; then
285285
SOCKET_GID=\$(stat -c '%g' ${SOURCE_SOCKET})
286286
if [ "\${SOCKET_GID}" != "0" ] && [ "\${SOCKET_GID}" != "${DOCKER_GID}" ]; then
287-
sudoIf groupmod --gid "\${SOCKET_GID}" "${USERNAME}"
287+
sudoIf groupmod --gid "\${SOCKET_GID}" docker
288288
else
289289
# Enable proxy if not already running
290290
if [ ! -f "\${SOCAT_PID}" ] || ! ps -p \$(cat \${SOCAT_PID}) > /dev/null; then
@@ -306,4 +306,4 @@ exec "\$@"
306306
EOF
307307
chmod +x /usr/local/share/docker-init.sh
308308
chown ${USERNAME}:root /usr/local/share/docker-init.sh
309-
echo "Done!"
309+
echo "Done!"

containers/codespaces-linux/.devcontainer/library-scripts/docker-debian.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ fi
227227

228228
# Add a stub if not adding non-root user access, user is root
229229
if [ "${ENABLE_NONROOT_DOCKER}" = "false" ] || [ "${USERNAME}" = "root" ]; then
230-
echo '/usr/bin/env bash -c "\$@"' > /usr/local/share/docker-init.sh
230+
echo -e '#!/usr/bin/env bash\nexec "$@"' > /usr/local/share/docker-init.sh
231231
chmod +x /usr/local/share/docker-init.sh
232232
exit 0
233233
fi
@@ -284,7 +284,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
284284
if [ "${ENABLE_NONROOT_DOCKER}" = "true" ] && [ "${SOURCE_SOCKET}" != "${TARGET_SOCKET}" ] && [ "${USERNAME}" != "root" ] && [ "${USERNAME}" != "0" ]; then
285285
SOCKET_GID=\$(stat -c '%g' ${SOURCE_SOCKET})
286286
if [ "\${SOCKET_GID}" != "0" ] && [ "\${SOCKET_GID}" != "${DOCKER_GID}" ]; then
287-
sudoIf groupmod --gid "\${SOCKET_GID}" "${USERNAME}"
287+
sudoIf groupmod --gid "\${SOCKET_GID}" docker
288288
else
289289
# Enable proxy if not already running
290290
if [ ! -f "\${SOCAT_PID}" ] || ! ps -p \$(cat \${SOCAT_PID}) > /dev/null; then
@@ -306,4 +306,4 @@ exec "\$@"
306306
EOF
307307
chmod +x /usr/local/share/docker-init.sh
308308
chown ${USERNAME}:root /usr/local/share/docker-init.sh
309-
echo "Done!"
309+
echo "Done!"

containers/dapr-dotnet/.devcontainer/library-scripts/docker-debian.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ fi
227227

228228
# Add a stub if not adding non-root user access, user is root
229229
if [ "${ENABLE_NONROOT_DOCKER}" = "false" ] || [ "${USERNAME}" = "root" ]; then
230-
echo '/usr/bin/env bash -c "\$@"' > /usr/local/share/docker-init.sh
230+
echo -e '#!/usr/bin/env bash\nexec "$@"' > /usr/local/share/docker-init.sh
231231
chmod +x /usr/local/share/docker-init.sh
232232
exit 0
233233
fi
@@ -284,7 +284,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
284284
if [ "${ENABLE_NONROOT_DOCKER}" = "true" ] && [ "${SOURCE_SOCKET}" != "${TARGET_SOCKET}" ] && [ "${USERNAME}" != "root" ] && [ "${USERNAME}" != "0" ]; then
285285
SOCKET_GID=\$(stat -c '%g' ${SOURCE_SOCKET})
286286
if [ "\${SOCKET_GID}" != "0" ] && [ "\${SOCKET_GID}" != "${DOCKER_GID}" ]; then
287-
sudoIf groupmod --gid "\${SOCKET_GID}" "${USERNAME}"
287+
sudoIf groupmod --gid "\${SOCKET_GID}" docker
288288
else
289289
# Enable proxy if not already running
290290
if [ ! -f "\${SOCAT_PID}" ] || ! ps -p \$(cat \${SOCAT_PID}) > /dev/null; then
@@ -306,4 +306,4 @@ exec "\$@"
306306
EOF
307307
chmod +x /usr/local/share/docker-init.sh
308308
chown ${USERNAME}:root /usr/local/share/docker-init.sh
309-
echo "Done!"
309+
echo "Done!"

containers/dapr-javascript-node/.devcontainer/library-scripts/docker-debian.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ fi
227227

228228
# Add a stub if not adding non-root user access, user is root
229229
if [ "${ENABLE_NONROOT_DOCKER}" = "false" ] || [ "${USERNAME}" = "root" ]; then
230-
echo '/usr/bin/env bash -c "\$@"' > /usr/local/share/docker-init.sh
230+
echo -e '#!/usr/bin/env bash\nexec "$@"' > /usr/local/share/docker-init.sh
231231
chmod +x /usr/local/share/docker-init.sh
232232
exit 0
233233
fi
@@ -284,7 +284,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
284284
if [ "${ENABLE_NONROOT_DOCKER}" = "true" ] && [ "${SOURCE_SOCKET}" != "${TARGET_SOCKET}" ] && [ "${USERNAME}" != "root" ] && [ "${USERNAME}" != "0" ]; then
285285
SOCKET_GID=\$(stat -c '%g' ${SOURCE_SOCKET})
286286
if [ "\${SOCKET_GID}" != "0" ] && [ "\${SOCKET_GID}" != "${DOCKER_GID}" ]; then
287-
sudoIf groupmod --gid "\${SOCKET_GID}" "${USERNAME}"
287+
sudoIf groupmod --gid "\${SOCKET_GID}" docker
288288
else
289289
# Enable proxy if not already running
290290
if [ ! -f "\${SOCAT_PID}" ] || ! ps -p \$(cat \${SOCAT_PID}) > /dev/null; then
@@ -306,4 +306,4 @@ exec "\$@"
306306
EOF
307307
chmod +x /usr/local/share/docker-init.sh
308308
chown ${USERNAME}:root /usr/local/share/docker-init.sh
309-
echo "Done!"
309+
echo "Done!"

containers/docker-from-docker-compose/.devcontainer/library-scripts/docker-debian.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ fi
227227

228228
# Add a stub if not adding non-root user access, user is root
229229
if [ "${ENABLE_NONROOT_DOCKER}" = "false" ] || [ "${USERNAME}" = "root" ]; then
230-
echo '/usr/bin/env bash -c "\$@"' > /usr/local/share/docker-init.sh
230+
echo -e '#!/usr/bin/env bash\nexec "$@"' > /usr/local/share/docker-init.sh
231231
chmod +x /usr/local/share/docker-init.sh
232232
exit 0
233233
fi
@@ -284,7 +284,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
284284
if [ "${ENABLE_NONROOT_DOCKER}" = "true" ] && [ "${SOURCE_SOCKET}" != "${TARGET_SOCKET}" ] && [ "${USERNAME}" != "root" ] && [ "${USERNAME}" != "0" ]; then
285285
SOCKET_GID=\$(stat -c '%g' ${SOURCE_SOCKET})
286286
if [ "\${SOCKET_GID}" != "0" ] && [ "\${SOCKET_GID}" != "${DOCKER_GID}" ]; then
287-
sudoIf groupmod --gid "\${SOCKET_GID}" "${USERNAME}"
287+
sudoIf groupmod --gid "\${SOCKET_GID}" docker
288288
else
289289
# Enable proxy if not already running
290290
if [ ! -f "\${SOCAT_PID}" ] || ! ps -p \$(cat \${SOCAT_PID}) > /dev/null; then
@@ -306,4 +306,4 @@ exec "\$@"
306306
EOF
307307
chmod +x /usr/local/share/docker-init.sh
308308
chown ${USERNAME}:root /usr/local/share/docker-init.sh
309-
echo "Done!"
309+
echo "Done!"

containers/docker-from-docker/.devcontainer/library-scripts/docker-debian.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ fi
227227

228228
# Add a stub if not adding non-root user access, user is root
229229
if [ "${ENABLE_NONROOT_DOCKER}" = "false" ] || [ "${USERNAME}" = "root" ]; then
230-
echo '/usr/bin/env bash -c "\$@"' > /usr/local/share/docker-init.sh
230+
echo -e '#!/usr/bin/env bash\nexec "$@"' > /usr/local/share/docker-init.sh
231231
chmod +x /usr/local/share/docker-init.sh
232232
exit 0
233233
fi
@@ -284,7 +284,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
284284
if [ "${ENABLE_NONROOT_DOCKER}" = "true" ] && [ "${SOURCE_SOCKET}" != "${TARGET_SOCKET}" ] && [ "${USERNAME}" != "root" ] && [ "${USERNAME}" != "0" ]; then
285285
SOCKET_GID=\$(stat -c '%g' ${SOURCE_SOCKET})
286286
if [ "\${SOCKET_GID}" != "0" ] && [ "\${SOCKET_GID}" != "${DOCKER_GID}" ]; then
287-
sudoIf groupmod --gid "\${SOCKET_GID}" "${USERNAME}"
287+
sudoIf groupmod --gid "\${SOCKET_GID}" docker
288288
else
289289
# Enable proxy if not already running
290290
if [ ! -f "\${SOCAT_PID}" ] || ! ps -p \$(cat \${SOCAT_PID}) > /dev/null; then
@@ -306,4 +306,4 @@ exec "\$@"
306306
EOF
307307
chmod +x /usr/local/share/docker-init.sh
308308
chown ${USERNAME}:root /usr/local/share/docker-init.sh
309-
echo "Done!"
309+
echo "Done!"

containers/kubernetes-helm/.devcontainer/library-scripts/docker-debian.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ fi
227227

228228
# Add a stub if not adding non-root user access, user is root
229229
if [ "${ENABLE_NONROOT_DOCKER}" = "false" ] || [ "${USERNAME}" = "root" ]; then
230-
echo '/usr/bin/env bash -c "\$@"' > /usr/local/share/docker-init.sh
230+
echo -e '#!/usr/bin/env bash\nexec "$@"' > /usr/local/share/docker-init.sh
231231
chmod +x /usr/local/share/docker-init.sh
232232
exit 0
233233
fi
@@ -284,7 +284,7 @@ log "Ensuring ${USERNAME} has access to ${SOURCE_SOCKET} via ${TARGET_SOCKET}"
284284
if [ "${ENABLE_NONROOT_DOCKER}" = "true" ] && [ "${SOURCE_SOCKET}" != "${TARGET_SOCKET}" ] && [ "${USERNAME}" != "root" ] && [ "${USERNAME}" != "0" ]; then
285285
SOCKET_GID=\$(stat -c '%g' ${SOURCE_SOCKET})
286286
if [ "\${SOCKET_GID}" != "0" ] && [ "\${SOCKET_GID}" != "${DOCKER_GID}" ]; then
287-
sudoIf groupmod --gid "\${SOCKET_GID}" "${USERNAME}"
287+
sudoIf groupmod --gid "\${SOCKET_GID}" docker
288288
else
289289
# Enable proxy if not already running
290290
if [ ! -f "\${SOCAT_PID}" ] || ! ps -p \$(cat \${SOCAT_PID}) > /dev/null; then
@@ -306,4 +306,4 @@ exec "\$@"
306306
EOF
307307
chmod +x /usr/local/share/docker-init.sh
308308
chown ${USERNAME}:root /usr/local/share/docker-init.sh
309-
echo "Done!"
309+
echo "Done!"

0 commit comments

Comments
 (0)