Allow the docker GID to be changed
@@ -15,7 +15,9 @@ CALICO_BUILD?=calico/go-build
PLUGIN_LOCATION?=$(CURDIR)/dist/libnetwork-plugin
DOCKER_BINARY_CONTAINER?=docker-binary-container
+# To run with non-native docker (e.g. on Windows or OSX) you might need to overide these variables
LOCAL_USER_ID?=$(shell id -u $$USER)
+LOCAL_GROUP_ID?=$(shell getent group docker | cut -d: -f3)
default: all
all: test
@@ -138,7 +140,7 @@ test-containerized: dist/libnetwork-plugin
-v $(CURDIR)/.go-pkg-cache:/go/pkg/:rw \
-v $(CURDIR)/docker:/usr/bin/docker \
-e PLUGIN_LOCATION=$(CURDIR)/dist/libnetwork-plugin \
- -e EXTRA_GROUP_ID=`getent group docker | cut -d: -f3` \
+ -e EXTRA_GROUP_ID=$(LOCAL_GROUP_ID) \
-e LOCAL_USER_ID=$(LOCAL_USER_ID) \
calico/go-build sh -c '\
cd /go/src/github.com/projectcalico/libnetwork-plugin && \
