Browse Source

Make docker group configurable

In devstack gate, jobs might be run with users other than $STACK_USER,
so the docker group should be configurable.

Change-Id: I64665b9883094d5603f3e737a1c08d924a058960
Hongbin Lu 1 year ago
parent
commit
b8f4f066ba
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      devstack/lib/docker

+ 2
- 1
devstack/lib/docker View File

@@ -24,6 +24,7 @@ set +o xtrace
24 24
 DOCKER_ENGINE_SOCKET_FILE=${DOCKER_ENGINE_SOCKET_FILE:-/var/run/docker.sock}
25 25
 DOCKER_ENGINE_PORT=${DOCKER_ENGINE_PORT:-2375}
26 26
 DOCKER_CLUSTER_STORE=${DOCKER_CLUSTER_STORE:-}
27
+DOCKER_GROUP=${DOCKER_GROUP:-$STACK_USER}
27 28
 
28 29
 
29 30
 # Functions
@@ -86,7 +87,7 @@ function configure_docker {
86 87
     cat <<EOF | sudo tee $docker_config_file >/dev/null
87 88
 {
88 89
     $cluster_store_opts
89
-    "group": "$STACK_USER",
90
+    "group": "$DOCKER_GROUP",
90 91
     "hosts": [
91 92
         "unix://$DOCKER_ENGINE_SOCKET_FILE",
92 93
         "tcp://0.0.0.0:$DOCKER_ENGINE_PORT"

Loading…
Cancel
Save