Skip to content

Commit

Permalink
Allow s390x non-root users to build fabric
Browse files Browse the repository at this point in the history
The uid of the user invoking the make commands
is passed into docker containers during the build
process.  For s390x, if the uid does not exist
within the docker container's /etc/passwd file,
"git clone" commands fail.

This patch resolves this issue and would then
allow Jenkins Fabric verify jobs to successfully
run on z.

Change-Id: Ic66cebb863f27c8aa372872248135e0dafa1d78a
Signed-off-by: John Harrison <[email protected]>
  • Loading branch information
John Harrison committed Dec 26, 2016
1 parent 43f4e57 commit d591708
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docker-env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ ifneq ($(shell uname),Darwin)
DOCKER_RUN_FLAGS=--user=$(shell id -u)
endif

ifeq ($(shell uname -m),s390x)
ifneq ($(shell id -u),0)
DOCKER_RUN_FLAGS+=-v /etc/passwd:/etc/passwd:ro
endif
endif

ifneq ($(http_proxy),)
DOCKER_BUILD_FLAGS+=--build-arg http_proxy=$(http_proxy)
DOCKER_RUN_FLAGS+=-e http_proxy=$(http_proxy)
Expand Down Expand Up @@ -82,6 +88,3 @@ DOCKER_GO_LDFLAGS += -linkmode external -extldflags '-static -lpthread'
# file to differentiate different tags to fix FAB-1145
#
DUMMY = .dummy-$(DOCKER_TAG)



0 comments on commit d591708

Please sign in to comment.