Skip to content

Instantly share code, notes, and snippets.

@mbaldessari
Created August 24, 2023 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbaldessari/e1eff9aba4e053b908bd103c749e705b to your computer and use it in GitHub Desktop.
Save mbaldessari/e1eff9aba4e053b908bd103c749e705b to your computer and use it in GitHub Desktop.
Silly patch to allow to build argo with podman
diff --git a/Makefile b/Makefile
index 4c1191881..264ae6777 100644
--- a/Makefile
+++ b/Makefile
@@ -65,6 +65,7 @@ DOCKER_SRC_MOUNT="$(DOCKER_SRCDIR):/go/src$(VOLUME_MOUNT)"
else
DOCKER_SRC_MOUNT="$(PWD):/go/src/github.com/argoproj/argo-cd$(VOLUME_MOUNT)"
endif
+DOCKER_RUN_OPTIONAL_ARGS?=
# User and group IDs to map to the test container
CONTAINER_UID=$(shell id -u)
@@ -77,6 +78,7 @@ SUDO?=
# Server mode container will start with uid 0 and drop privileges during runtime
define run-in-test-server
$(SUDO) docker run --rm -it \
+ $(DOCKER_RUN_OPTIONAL_ARGS) \
--name argocd-test-server \
-u $(CONTAINER_UID):$(CONTAINER_GID) \
-e USER_ID=$(CONTAINER_UID) \
@@ -108,6 +110,7 @@ endef
# Runs any command in the argocd-test-utils container in client mode
define run-in-test-client
$(SUDO) docker run --rm -it \
+ $(DOCKER_RUN_OPTIONAL_ARGS) \
--name argocd-test-client \
-u $(CONTAINER_UID):$(CONTAINER_GID) \
-e HOME=/home/user \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment