From 47a022b2e38b003aa5f805f746f1dd4c3ae4b32b Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 6 Dec 2021 16:39:39 +0100 Subject: [PATCH] root user should always be able to write to the socket but leave the check there just in case Signed-off-by: szaimen --- Containers/watchtower/start.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Containers/watchtower/start.sh b/Containers/watchtower/start.sh index 4a83bc26..34b7b7a8 100644 --- a/Containers/watchtower/start.sh +++ b/Containers/watchtower/start.sh @@ -5,14 +5,8 @@ if ! [ -a "/var/run/docker.sock" ]; then echo "Docker socket is not available. Cannot continue." exit 1 elif ! test -r /var/run/docker.sock; then - echo "Trying to fix docker.sock permissions internally..." - GROUP="$(stat -c '%g' /var/run/docker.sock)" - groupadd -g "$GROUP" docker && \ - usermod -aG docker root - if ! test -r /var/run/docker.sock; then - echo "Docker socket is not readable by the root user. Cannot continue." - exit 1 - fi + echo "Docker socket is not readable by the root user. Cannot continue." + exit 1 fi if [ -n "$CONTAINER_TO_UPDATE" ]; then