From 700529fe06e22443283271f7c494a70e2084fdeb Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 28 Sep 2020 08:36:40 +0200 Subject: [PATCH] Tag image before building next image --- build_helpers/publish_docker.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build_helpers/publish_docker.sh b/build_helpers/publish_docker.sh index 53e18063c..ac0cd2461 100755 --- a/build_helpers/publish_docker.sh +++ b/build_helpers/publish_docker.sh @@ -17,8 +17,13 @@ else docker pull ${IMAGE_NAME}:${TAG} docker build --cache-from ${IMAGE_NAME}:${TAG} -t freqtrade:${TAG} . fi +# Tag image for upload and next build step +docker tag freqtrade:$TAG ${IMAGE_NAME}:$TAG + docker build --cache-from freqtrade:${TAG} --build-arg sourceimage=${TAG} -t freqtrade:${TAG_PLOT} -f docker/Dockerfile.plot . +docker tag freqtrade:$TAG_PLOT ${IMAGE_NAME}:$TAG_PLOT + if [ $? -ne 0 ]; then echo "failed building image" return 1 @@ -32,9 +37,6 @@ if [ $? -ne 0 ]; then return 1 fi -# Tag image for upload -docker tag freqtrade:$TAG ${IMAGE_NAME}:$TAG -docker tag freqtrade:$TAG_PLOT ${IMAGE_NAME}:$TAG_PLOT if [ $? -ne 0 ]; then echo "failed tagging image" return 1