Skip to content

Commit d591708

Browse files
author
John Harrison
committed
Allow s390x non-root users to build fabric
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]>
1 parent 43f4e57 commit d591708

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docker-env.mk

+6-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ ifneq ($(shell uname),Darwin)
1919
DOCKER_RUN_FLAGS=--user=$(shell id -u)
2020
endif
2121

22+
ifeq ($(shell uname -m),s390x)
23+
ifneq ($(shell id -u),0)
24+
DOCKER_RUN_FLAGS+=-v /etc/passwd:/etc/passwd:ro
25+
endif
26+
endif
27+
2228
ifneq ($(http_proxy),)
2329
DOCKER_BUILD_FLAGS+=--build-arg http_proxy=$(http_proxy)
2430
DOCKER_RUN_FLAGS+=-e http_proxy=$(http_proxy)
@@ -82,6 +88,3 @@ DOCKER_GO_LDFLAGS += -linkmode external -extldflags '-static -lpthread'
8288
# file to differentiate different tags to fix FAB-1145
8389
#
8490
DUMMY = .dummy-$(DOCKER_TAG)
85-
86-
87-

0 commit comments

Comments
 (0)