Skip to content

Commit 212f7c7

Browse files
committed
run podman with --userns=keep-id by default
Signed-off-by: iTrooz <[email protected]>
1 parent 3107639 commit 212f7c7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ ifneq (, $(shell which docker 2>/dev/null))
2525
DOCKER := docker
2626
else ifneq (, $(shell which podman 2>/dev/null))
2727
DOCKER := podman
28+
# map host uid to container uid
29+
export PODMAN_USERNS=keep-id
2830
else
2931
$(error Neither docker nor podman found)
3032
endif
@@ -214,6 +216,7 @@ shell: build-dirs build-env
214216
-e GOPROXY \
215217
-i $(TTY) \
216218
--rm \
219+
-u $$(id -u):$$(id -g) \
217220
-v "$$(pwd):/github.com/vmware-tanzu/velero:delegated" \
218221
-v "$$(pwd)/_output/bin:/output:delegated" \
219222
-v "$$(pwd)/.go/pkg:/go/pkg:delegated" \

0 commit comments

Comments
 (0)