From 027826fdba19a8211d5787cc80955bdf91336f45 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 2 Nov 2020 14:24:39 +0100 Subject: [PATCH] introduce 'REGISTRY' argument to all Dockerfiles This is initialized to docker.io, keeping the default behaviour if not specified. However, it allows us to specify a private registry later on. Related: OS#4839 Change-Id: I32d4ee6256033c809108c1b86cb6b6c58d880f49 --- alpine-build/Dockerfile | 3 ++- centos-repo-install-test/Dockerfile | 3 ++- centos8-build/Dockerfile | 3 ++- debian-buster-build/Dockerfile | 3 ++- debian-buster-erlang/Dockerfile | 3 ++- debian-jessie-build/Dockerfile | 3 ++- debian-jessie-osmocom/Dockerfile | 3 ++- debian-repo-install-test/Dockerfile | 3 ++- debian-sid-build/Dockerfile | 3 ++- debian-stretch-build/Dockerfile | 3 ++- debian-stretch-jenkins/Dockerfile | 5 +++-- debian-stretch-titan/Dockerfile | 3 ++- gr-gsm-master/Dockerfile | 3 ++- make/Makefile | 1 + open5gs-master/Dockerfile | 3 ++- osmo-bsc-latest/Dockerfile | 3 ++- osmo-bts-latest/Dockerfile | 3 ++- osmo-cn-latest/Dockerfile | 3 ++- osmo-ggsn-latest/Dockerfile | 3 ++- osmo-hlr-latest/Dockerfile | 3 ++- osmo-hnbgw-latest/Dockerfile | 3 ++- osmo-mgw-latest/Dockerfile | 3 ++- osmo-msc-latest/Dockerfile | 3 ++- osmo-nitb-latest/Dockerfile | 3 ++- osmo-pcu-latest/Dockerfile | 3 ++- osmo-remsim-latest/Dockerfile | 3 ++- osmo-sgsn-latest/Dockerfile | 3 ++- osmo-sip-latest/Dockerfile | 3 ++- osmo-stp-latest/Dockerfile | 3 ++- ubuntu-zesty-build/Dockerfile | 3 ++- 30 files changed, 60 insertions(+), 30 deletions(-) diff --git a/alpine-build/Dockerfile b/alpine-build/Dockerfile index 622b838c..26b8d29b 100644 --- a/alpine-build/Dockerfile +++ b/alpine-build/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.6 +ARG REGISTRY=docker.io +FROM ${REGISTRY}/alpine:3.6 MAINTAINER Harald Welte diff --git a/centos-repo-install-test/Dockerfile b/centos-repo-install-test/Dockerfile index 45f0ba43..3f536508 100644 --- a/centos-repo-install-test/Dockerfile +++ b/centos-repo-install-test/Dockerfile @@ -1,5 +1,6 @@ ARG USER -FROM centos:centos8 +ARG REGISTRY=docker.io +FROM ${REGISTRY}/centos:centos8 # dnf-utils: for repoquery RUN dnf install -y \ diff --git a/centos8-build/Dockerfile b/centos8-build/Dockerfile index 511f3501..46ce23ea 100644 --- a/centos8-build/Dockerfile +++ b/centos8-build/Dockerfile @@ -1,4 +1,5 @@ -FROM centos:centos8 +ARG REGISTRY=docker.io +FROM ${REGISTRY}/centos:centos8 # Let package metadata expire after 60 seconds instead of 48 hours RUN echo "metadata_expire=60" >> /etc/dnf/dnf.conf && cat /etc/dnf/dnf.conf diff --git a/debian-buster-build/Dockerfile b/debian-buster-build/Dockerfile index 28116abb..119afead 100644 --- a/debian-buster-build/Dockerfile +++ b/debian-buster-build/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:buster +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:buster MAINTAINER Harald Welte diff --git a/debian-buster-erlang/Dockerfile b/debian-buster-erlang/Dockerfile index 23da345e..8ac470f4 100644 --- a/debian-buster-erlang/Dockerfile +++ b/debian-buster-erlang/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:buster +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:buster MAINTAINER Harald Welte diff --git a/debian-jessie-build/Dockerfile b/debian-jessie-build/Dockerfile index 9a2f9fc9..60f6ca9b 100644 --- a/debian-jessie-build/Dockerfile +++ b/debian-jessie-build/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:jessie +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:jessie MAINTAINER Harald Welte diff --git a/debian-jessie-osmocom/Dockerfile b/debian-jessie-osmocom/Dockerfile index e3709b2a..77c223fc 100644 --- a/debian-jessie-osmocom/Dockerfile +++ b/debian-jessie-osmocom/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:jessie +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:jessie MAINTAINER Harald Welte diff --git a/debian-repo-install-test/Dockerfile b/debian-repo-install-test/Dockerfile index 5448fd67..e718a233 100644 --- a/debian-repo-install-test/Dockerfile +++ b/debian-repo-install-test/Dockerfile @@ -1,5 +1,6 @@ ARG USER -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch COPY Release.key /tmp/Release.key diff --git a/debian-sid-build/Dockerfile b/debian-sid-build/Dockerfile index 6348fc78..ffa86e2f 100644 --- a/debian-sid-build/Dockerfile +++ b/debian-sid-build/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:sid +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:sid MAINTAINER Harald Welte diff --git a/debian-stretch-build/Dockerfile b/debian-stretch-build/Dockerfile index 35440a09..ac527087 100644 --- a/debian-stretch-build/Dockerfile +++ b/debian-stretch-build/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/debian-stretch-jenkins/Dockerfile b/debian-stretch-jenkins/Dockerfile index e73b7aeb..c682d9c0 100644 --- a/debian-stretch-jenkins/Dockerfile +++ b/debian-stretch-jenkins/Dockerfile @@ -1,8 +1,9 @@ # Image used to run contrib/jenkins.sh scripts of most Osmocom projects. # See master-builds.yml, gerrit-verifications.yml in osmo-ci.git. -ARG DEBIAN_VERSION=stretch -FROM debian:${DEBIAN_VERSION} +ARG DEBIAN_VERSION=stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:${DEBIAN_VERSION} # Make "$DEBIAN_VERSION" available after FROM # https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile index 15e4492a..303e4a32 100644 --- a/debian-stretch-titan/Dockerfile +++ b/debian-stretch-titan/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/gr-gsm-master/Dockerfile b/gr-gsm-master/Dockerfile index a756b88f..71dc6107 100644 --- a/gr-gsm-master/Dockerfile +++ b/gr-gsm-master/Dockerfile @@ -1,4 +1,5 @@ -FROM archlinux/base +ARG REGISTRY=docker.io +FROM ${REGISTRY}/archlinux/base MAINTAINER Vadim Yanitskiy diff --git a/make/Makefile b/make/Makefile index d4830821..1a13c4d4 100644 --- a/make/Makefile +++ b/make/Makefile @@ -59,6 +59,7 @@ post-push: docker-build: .release docker build \ --build-arg USER=$(USERNAME) \ + --build-arg REGISTRY=$(REGISTRY_HOST) \ --build-arg OSMO_TTCN3_BRANCH=$(OSMO_TTCN3_BRANCH) \ --build-arg DISTRO=$(DISTRO) \ --build-arg LIBOSMOCORE_BRANCH=$(LIBOSMOCORE_BRANCH) \ diff --git a/open5gs-master/Dockerfile b/open5gs-master/Dockerfile index 37344cf3..2af9f125 100644 --- a/open5gs-master/Dockerfile +++ b/open5gs-master/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:buster +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:buster MAINTAINER Harald Welte diff --git a/osmo-bsc-latest/Dockerfile b/osmo-bsc-latest/Dockerfile index 5206a08c..1ab1e025 100644 --- a/osmo-bsc-latest/Dockerfile +++ b/osmo-bsc-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/osmo-bts-latest/Dockerfile b/osmo-bts-latest/Dockerfile index 05c27fd6..df1d8328 100644 --- a/osmo-bts-latest/Dockerfile +++ b/osmo-bts-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/osmo-cn-latest/Dockerfile b/osmo-cn-latest/Dockerfile index 3b49c29d..ba986215 100644 --- a/osmo-cn-latest/Dockerfile +++ b/osmo-cn-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Daniel Willmann diff --git a/osmo-ggsn-latest/Dockerfile b/osmo-ggsn-latest/Dockerfile index 5259d518..ac50c4ed 100644 --- a/osmo-ggsn-latest/Dockerfile +++ b/osmo-ggsn-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/osmo-hlr-latest/Dockerfile b/osmo-hlr-latest/Dockerfile index f00c2d9a..606a2df2 100644 --- a/osmo-hlr-latest/Dockerfile +++ b/osmo-hlr-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/osmo-hnbgw-latest/Dockerfile b/osmo-hnbgw-latest/Dockerfile index 161480ba..15e515f6 100644 --- a/osmo-hnbgw-latest/Dockerfile +++ b/osmo-hnbgw-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/osmo-mgw-latest/Dockerfile b/osmo-mgw-latest/Dockerfile index 9a403f8f..eba9ace8 100644 --- a/osmo-mgw-latest/Dockerfile +++ b/osmo-mgw-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/osmo-msc-latest/Dockerfile b/osmo-msc-latest/Dockerfile index 5780f715..6fc58589 100644 --- a/osmo-msc-latest/Dockerfile +++ b/osmo-msc-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/osmo-nitb-latest/Dockerfile b/osmo-nitb-latest/Dockerfile index 9e7ebdfd..5dafc330 100644 --- a/osmo-nitb-latest/Dockerfile +++ b/osmo-nitb-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/osmo-pcu-latest/Dockerfile b/osmo-pcu-latest/Dockerfile index fdd5e562..ccd492c2 100644 --- a/osmo-pcu-latest/Dockerfile +++ b/osmo-pcu-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/osmo-remsim-latest/Dockerfile b/osmo-remsim-latest/Dockerfile index c2d0e674..22290322 100644 --- a/osmo-remsim-latest/Dockerfile +++ b/osmo-remsim-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/osmo-sgsn-latest/Dockerfile b/osmo-sgsn-latest/Dockerfile index 17ea5169..f24b11c6 100644 --- a/osmo-sgsn-latest/Dockerfile +++ b/osmo-sgsn-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/osmo-sip-latest/Dockerfile b/osmo-sip-latest/Dockerfile index 24dfefa8..cdf1315c 100644 --- a/osmo-sip-latest/Dockerfile +++ b/osmo-sip-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/osmo-stp-latest/Dockerfile b/osmo-stp-latest/Dockerfile index 563378b8..aca833fb 100644 --- a/osmo-stp-latest/Dockerfile +++ b/osmo-stp-latest/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG REGISTRY=docker.io +FROM ${REGISTRY}/debian:stretch MAINTAINER Harald Welte diff --git a/ubuntu-zesty-build/Dockerfile b/ubuntu-zesty-build/Dockerfile index b524c27a..cfda27fd 100644 --- a/ubuntu-zesty-build/Dockerfile +++ b/ubuntu-zesty-build/Dockerfile @@ -1,4 +1,5 @@ -FROM ubuntu:zesty +ARG REGISTRY=docker.io +FROM ${REGISTRY}/ubuntu:zesty MAINTAINER Harald Welte