[glib: 4/5] run-docker: Do not require sudo if the user is part of docker group




commit d6a378afa708918db3f19d3078278334e35c7099
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Thu Sep 15 02:58:26 2022 +0200

    run-docker: Do not require sudo if the user is part of docker group

 .gitlab-ci/run-docker.sh | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh
index 56b2b0a7da..33a0ae5d1a 100755
--- a/.gitlab-ci/run-docker.sh
+++ b/.gitlab-ci/run-docker.sh
@@ -23,6 +23,8 @@ if docker -v |& grep -q podman; then
         # is incompatible with some of the dockerd instances on GitLab
         # CI runners.
         export BUILDAH_FORMAT=docker
+elif getent group docker | grep -q "\b${USER}\b"; then
+        SUDO_CMD=""
 fi
 
 set -e


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]