Skip to content

Commit

Permalink
apb: Use uid 1000 for the apb actions
Browse files Browse the repository at this point in the history
Using uid 1000 during the apb invocation using its containers makes sure
that it can see the mounted kubeconfig. This makes it possibly to push
both as a regular and root user.

Signed-off-by: Roy Golan <[email protected]>
Fixes: oVirt#30
  • Loading branch information
rgolangh committed Jul 3, 2018
1 parent dc8395a commit f63d4d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions deployment/ovirt-flexvolume-driver-apb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ IMAGENAME = ovirt-flexvolume-driver-apb
TAG = latest
USER=$(shell id -u)
PWD=$(shell pwd)
KUBEDIR=$(HOME)/.kube

build_and_push: apb_build docker_push apb_push

.PHONY: apb_build
apb_build:
docker run --rm --privileged -v $(PWD):/mnt:z -v $(HOME)/.kube:/.kube -v /var/run/docker.sock:/var/run/docker.sock -u $(USER) docker.io/ansibleplaybookbundle/apb-tools:latest prepare
docker run --rm --privileged -v $(PWD):/mnt:z -v /var/run/docker.sock:/var/run/docker.sock -u 1000 docker.io/ansibleplaybookbundle/apb-tools:latest prepare
docker build -t $(DOCKERHOST)/$(DOCKERORG)/$(IMAGENAME):$(TAG) .

.PHONY: docker_push
Expand All @@ -17,4 +19,4 @@ docker_push:

.PHONY: apb_push
apb_push:
docker run --rm --privileged -v $(PWD):/mnt:z -v $(HOME)/.kube:/.kube -v /var/run/docker.sock:/var/run/docker.sock -u $(USER) docker.io/ansibleplaybookbundle/apb-tools:latest push
docker run --rm --privileged -v $(PWD):/mnt:z -v $(KUBEDIR):/.kube:z -v /var/run/docker.sock:/var/run/docker.sock -u 1000 docker.io/ansibleplaybookbundle/apb-tools:latest push

0 comments on commit f63d4d3

Please sign in to comment.