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

This commit is contained in:
Marco Trevisan (Treviño) 2022-09-15 02:58:26 +02:00
parent 3ddfb10b0b
commit d6a378afa7

View File

@ -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