From 15a2e638661a236b7f4060bd91ad381dceb2f484 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Fri, 27 Dec 2019 11:36:45 +0100 Subject: [PATCH] combine arch and latest --- build.sh | 19 +++++++++---------- docker/Dockerfiles/Dockerfile-base | 3 +-- push.sh | 6 ++++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build.sh b/build.sh index ff47d27..c2392d7 100755 --- a/build.sh +++ b/build.sh @@ -3,14 +3,13 @@ set -euxo pipefail ARCH=$(uname -m) -BASE_IMAGE=alpine:3.10 +TAG="latest" +ARCHTAG="$TAG-$ARCH" -TAGS=$ARCH - -docker build --pull --no-cache --build-arg BASE_IMAGE=$BASE_IMAGE -t openwebrx-base:$ARCH -f docker/Dockerfiles/Dockerfile-base . -docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-rtlsdr:$ARCH -f docker/Dockerfiles/Dockerfile-rtlsdr . -docker build --build-arg ARCH=$ARCH -t openwebrx-soapysdr-base:$ARCH -f docker/Dockerfiles/Dockerfile-soapysdr . -docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-sdrplay:$ARCH -f docker/Dockerfiles/Dockerfile-sdrplay . -docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-hackrf:$ARCH -f docker/Dockerfiles/Dockerfile-hackrf . -docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-airspy:$ARCH -f docker/Dockerfiles/Dockerfile-airspy . -docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-full:$ARCH -t jketterl/openwebrx:$ARCH -f docker/Dockerfiles/Dockerfile-full . +docker build --pull --no-cache -t openwebrx-base:$ARCHTAG -f docker/Dockerfiles/Dockerfile-base . +docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-rtlsdr:$ARCHTAG -f docker/Dockerfiles/Dockerfile-rtlsdr . +docker build --build-arg ARCH=$ARCH -t openwebrx-soapysdr-base:$ARCHTAG -f docker/Dockerfiles/Dockerfile-soapysdr . +docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-sdrplay:$ARCHTAG -f docker/Dockerfiles/Dockerfile-sdrplay . +docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-hackrf:$ARCHTAG -f docker/Dockerfiles/Dockerfile-hackrf . +docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-airspy:$ARCHTAG -f docker/Dockerfiles/Dockerfile-airspy . +docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-full:$ARCHTAG -t jketterl/openwebrx:$ARCHTAG -f docker/Dockerfiles/Dockerfile-full . diff --git a/docker/Dockerfiles/Dockerfile-base b/docker/Dockerfiles/Dockerfile-base index 3c72a9a..3333140 100644 --- a/docker/Dockerfiles/Dockerfile-base +++ b/docker/Dockerfiles/Dockerfile-base @@ -1,5 +1,4 @@ -ARG BASE_IMAGE -FROM $BASE_IMAGE +FROM alpine:3.10 RUN apk add --no-cache bash diff --git a/push.sh b/push.sh index a57fcd7..abd3882 100755 --- a/push.sh +++ b/push.sh @@ -4,12 +4,14 @@ set -euxo pipefail ARCH=$(uname -m) ALL_ARCHS="x86_64 armv7l aarch64" +TAG="latest" +ARCHTAG="$TAG-$ARCH" for image in openwebrx-rtlsdr openwebrx-sdrplay openwebrx-hackrf openwebrx-airspy openwebrx-full openwebrx; do - docker push jketterl/$image:$ARCH + docker push jketterl/$image:$ARCHTAG IMAGE_LIST="" for a in $ALL_ARCHS; do - IMAGE_LIST="$IMAGE_LIST jketterl/$image:$a" + IMAGE_LIST="$IMAGE_LIST jketterl/$image:$TAG-$a" done docker manifest create --amend jketterl/$image:latest $IMAGE_LIST docker manifest push --purge jketterl/$image:latest