Review at  https://gerrit.osmocom.org/7720

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(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/20/7720/1

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 <lafo...@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 <lafo...@gnumonks.org>
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied42c3e1de9a2ffaca22ba4cd02e6a398e48e97d
Gerrit-PatchSet: 1
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lyn...@fe80.eu>

Reply via email to