[MERGED] docker-playground[master]: Makefile: use $USER/image when depending on a generated image

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Apr 12 09:20:41 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: Makefile: use $USER/image when depending on a generated image
......................................................................


Makefile: use $USER/image when depending on a generated image

Te make scripts will generate docker images like
"$username/foobar-test". When depending on an previous image,
the $username must match or the build will about with image not found.

Change-Id: Ied42c3e1de9a2ffaca22ba4cd02e6a398e48e97d
---
M m3ua-test/Dockerfile
M make/Makefile
M sua-test/Dockerfile
3 files changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/m3ua-test/Dockerfile b/m3ua-test/Dockerfile
index edd139a..ba5d17d 100644
--- a/m3ua-test/Dockerfile
+++ b/m3ua-test/Dockerfile
@@ -1,4 +1,5 @@
-FROM laforge/sigtran-tests
+ARG USER=osmocom-build
+FROM $USER/sigtran-tests
 
 MAINTAINER Harald Welte <laforge at gnumonks.org>
 
diff --git a/make/Makefile b/make/Makefile
index 21614a8..f492d60 100644
--- a/make/Makefile
+++ b/make/Makefile
@@ -40,7 +40,7 @@
 
 
 docker-build: .release
-	docker build -t $(IMAGE):latest .
+	docker build --build-arg USER=$(USERNAME) -t $(IMAGE):latest .
 	@DOCKER_MAJOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f1) ; \
 	DOCKER_MINOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f2) ; \
 
diff --git a/sua-test/Dockerfile b/sua-test/Dockerfile
index 141497e..f7f071a 100644
--- a/sua-test/Dockerfile
+++ b/sua-test/Dockerfile
@@ -1,4 +1,5 @@
-FROM laforge/sigtran-tests
+ARG USER=osmocom-build
+FROM $USER/sigtran-tests
 
 MAINTAINER Harald Welte <laforge at gnumonks.org>
 

-- 
To view, visit https://gerrit.osmocom.org/7720
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied42c3e1de9a2ffaca22ba4cd02e6a398e48e97d
Gerrit-PatchSet: 2
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>



More information about the gerrit-log mailing list