From 7d7a06b749fbfefdb55b9dff3b727d17a38004f5 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 18 Nov 2020 17:52:56 +0100 Subject: [PATCH] common: Introduce OSMOCOM_REPO_MIRROR param This allows easily changing to another osmocom repo base URL if the default one is down. Related: OS#4862 Change-Id: I8010b08f3dabacfb3c13a44eece6c7a490e0742e --- debian-buster-erlang/Dockerfile | 4 +++- debian-buster-simtrace2/Dockerfile | 4 +++- debian-jessie-osmocom/Dockerfile | 4 +++- debian-stretch-build-dist/Dockerfile | 4 +++- debian-stretch-jenkins/Dockerfile | 4 +++- debian-stretch-titan/Dockerfile | 4 +++- make/Makefile | 3 +++ osmo-bsc-latest/Dockerfile | 4 +++- osmo-bsc-master/Dockerfile | 6 ++++-- osmo-bts-latest/Dockerfile | 4 +++- osmo-bts-master/Dockerfile | 6 ++++-- osmo-cn-latest/Dockerfile | 4 +++- osmo-ggsn-latest/Dockerfile | 4 +++- osmo-ggsn-master/Dockerfile | 6 ++++-- osmo-gsm-tester/Dockerfile | 4 +++- osmo-hlr-latest/Dockerfile | 4 +++- osmo-hlr-master/Dockerfile | 6 ++++-- osmo-hnbgw-latest/Dockerfile | 4 +++- osmo-hnbgw-master/Dockerfile | 10 +++++++--- osmo-mgw-latest/Dockerfile | 4 +++- osmo-mgw-master/Dockerfile | 6 ++++-- osmo-msc-latest/Dockerfile | 4 +++- osmo-msc-master/Dockerfile | 6 ++++-- osmo-nitb-latest/Dockerfile | 4 +++- osmo-nitb-master/Dockerfile | 11 ++++++++--- osmo-pcu-latest/Dockerfile | 6 ++++-- osmo-pcu-master/Dockerfile | 6 ++++-- osmo-remsim-latest/Dockerfile | 6 ++++-- osmo-remsim-master/Dockerfile | 6 ++++-- osmo-sgsn-latest/Dockerfile | 4 +++- osmo-sgsn-master/Dockerfile | 6 ++++-- osmo-sip-latest/Dockerfile | 6 ++++-- osmo-sip-master/Dockerfile | 6 ++++-- osmo-smlc-master/Dockerfile | 6 ++++-- osmo-stp-latest/Dockerfile | 4 +++- osmo-stp-master/Dockerfile | 6 ++++-- osmo-uecups-master/Dockerfile | 4 +++- osmocom-bb-host-master/Dockerfile | 9 +++++++-- 38 files changed, 142 insertions(+), 57 deletions(-) diff --git a/debian-buster-erlang/Dockerfile b/debian-buster-erlang/Dockerfile index 8ac470f4..401abe6a 100644 --- a/debian-buster-erlang/Dockerfile +++ b/debian-buster-erlang/Dockerfile @@ -1,9 +1,11 @@ ARG REGISTRY=docker.io FROM ${REGISTRY}/debian:buster +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_10/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_10/" # install the erlang vm and rebar (2) RUN apt-get update && \ diff --git a/debian-buster-simtrace2/Dockerfile b/debian-buster-simtrace2/Dockerfile index cd1d359b..bac3c228 100644 --- a/debian-buster-simtrace2/Dockerfile +++ b/debian-buster-simtrace2/Dockerfile @@ -1,9 +1,11 @@ ARG USER FROM $USER/debian-buster-build +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_10/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_10/" COPY Release.key /tmp/Release.key diff --git a/debian-jessie-osmocom/Dockerfile b/debian-jessie-osmocom/Dockerfile index 77c223fc..1a3101d2 100644 --- a/debian-jessie-osmocom/Dockerfile +++ b/debian-jessie-osmocom/Dockerfile @@ -1,9 +1,11 @@ ARG REGISTRY=docker.io FROM ${REGISTRY}/debian:jessie +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_8.0/" COPY Release.key /tmp/Release.key diff --git a/debian-stretch-build-dist/Dockerfile b/debian-stretch-build-dist/Dockerfile index a1f02908..5e12a814 100644 --- a/debian-stretch-build-dist/Dockerfile +++ b/debian-stretch-build-dist/Dockerfile @@ -1,7 +1,9 @@ ARG USER FROM $USER/debian-stretch-build +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/debian-stretch-jenkins/Dockerfile b/debian-stretch-jenkins/Dockerfile index c682d9c0..6455a215 100644 --- a/debian-stretch-jenkins/Dockerfile +++ b/debian-stretch-jenkins/Dockerfile @@ -4,6 +4,8 @@ ARG DEBIAN_VERSION=stretch ARG REGISTRY=docker.io FROM ${REGISTRY}/debian:${DEBIAN_VERSION} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" # Make "$DEBIAN_VERSION" available after FROM # https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact @@ -153,7 +155,7 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ ENV LANG en_US.UTF-8 # osmo-remsim needs libulfius which is built in osmocom OBS repos: -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key RUN apt-key add /tmp/Release.key && \ rm /tmp/Release.key && \ diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile index 01d941e8..4b288d05 100644 --- a/debian-stretch-titan/Dockerfile +++ b/debian-stretch-titan/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" RUN apt-get update && apt-get install -y \ gnupg diff --git a/make/Makefile b/make/Makefile index 63562f3b..4f2263bc 100644 --- a/make/Makefile +++ b/make/Makefile @@ -35,6 +35,8 @@ OSMO_STP_BRANCH?=master PULL?= UPSTREAM_DISTRO?=debian:stretch DISTRO?=debian-stretch +OSMOCOM_REPO_MIRROR?=http://download.opensuse.org +# Use if down: OSMOCOM_REPO_MIRROR=http://ftp.uni-stuttgart.de/opensuse RELEASE_SUPPORT := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/.make-release-support IMAGE?=$(REGISTRY_HOST)/$(USER)/$(NAME) @@ -64,6 +66,7 @@ docker-build: .release --build-arg OSMO_TTCN3_BRANCH=$(OSMO_TTCN3_BRANCH) \ --build-arg UPSTREAM_DISTRO=$(UPSTREAM_DISTRO) \ --build-arg DISTRO=$(DISTRO) \ + --build-arg OSMOCOM_REPO_MIRROR=$(OSMOCOM_REPO_MIRROR) \ --build-arg LIBOSMOCORE_BRANCH=$(LIBOSMOCORE_BRANCH) \ --build-arg OSMO_BB_BRANCH=$(OSMO_BB_BRANCH) \ --build-arg OSMO_BSC_BRANCH=$(OSMO_BSC_BRANCH) \ diff --git a/osmo-bsc-latest/Dockerfile b/osmo-bsc-latest/Dockerfile index 178af722..d327a245 100644 --- a/osmo-bsc-latest/Dockerfile +++ b/osmo-bsc-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index 6c398313..00ca4cbc 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -1,12 +1,14 @@ ARG USER ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -21,7 +23,7 @@ RUN case "$DISTRO" in \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN case "$DISTRO" in \ debian*) \ apt-get update && \ diff --git a/osmo-bts-latest/Dockerfile b/osmo-bts-latest/Dockerfile index 954fc582..87d1f232 100644 --- a/osmo-bts-latest/Dockerfile +++ b/osmo-bts-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile index df6ebb64..e3adeba7 100644 --- a/osmo-bts-master/Dockerfile +++ b/osmo-bts-master/Dockerfile @@ -1,12 +1,14 @@ ARG USER ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -21,7 +23,7 @@ RUN case "$DISTRO" in \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN case "$DISTRO" in \ debian*) \ apt-get update && \ diff --git a/osmo-cn-latest/Dockerfile b/osmo-cn-latest/Dockerfile index ca6859d4..b2c2a786 100644 --- a/osmo-cn-latest/Dockerfile +++ b/osmo-cn-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Daniel Willmann -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/osmo-ggsn-latest/Dockerfile b/osmo-ggsn-latest/Dockerfile index 3430791a..d84dd4e0 100644 --- a/osmo-ggsn-latest/Dockerfile +++ b/osmo-ggsn-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile index a70a62e6..1d246d07 100644 --- a/osmo-ggsn-master/Dockerfile +++ b/osmo-ggsn-master/Dockerfile @@ -1,12 +1,14 @@ ARG USER ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -21,7 +23,7 @@ RUN case "$DISTRO" in \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN case "$DISTRO" in \ debian*) \ apt-get update && \ diff --git a/osmo-gsm-tester/Dockerfile b/osmo-gsm-tester/Dockerfile index a19c3851..675d7dff 100644 --- a/osmo-gsm-tester/Dockerfile +++ b/osmo-gsm-tester/Dockerfile @@ -1,5 +1,7 @@ ARG USER FROM $USER/debian-stretch-jenkins +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Pau Espin Pedrol @@ -75,7 +77,7 @@ RUN cd /tmp && \ make && \ make install -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/osmo-hlr-latest/Dockerfile b/osmo-hlr-latest/Dockerfile index a8e106c4..94686346 100644 --- a/osmo-hlr-latest/Dockerfile +++ b/osmo-hlr-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/osmo-hlr-master/Dockerfile b/osmo-hlr-master/Dockerfile index b6e572b8..3757a32d 100644 --- a/osmo-hlr-master/Dockerfile +++ b/osmo-hlr-master/Dockerfile @@ -1,12 +1,14 @@ ARG USER ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -21,7 +23,7 @@ RUN case "$DISTRO" in \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN case "$DISTRO" in \ debian*) \ apt-get update && \ diff --git a/osmo-hnbgw-latest/Dockerfile b/osmo-hnbgw-latest/Dockerfile index b39d2e77..33f98085 100644 --- a/osmo-hnbgw-latest/Dockerfile +++ b/osmo-hnbgw-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index 2e7b0b7f..46d5fe5d 100644 --- a/osmo-hnbgw-master/Dockerfile +++ b/osmo-hnbgw-master/Dockerfile @@ -1,9 +1,13 @@ ARG USER -FROM $USER/debian-stretch-build +ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" +FROM $USER/$DISTRO-build +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -14,7 +18,7 @@ RUN apt-key add /tmp/Release.key && \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN apt-get update && \ apt-get install -y --no-install-recommends \ telnet \ diff --git a/osmo-mgw-latest/Dockerfile b/osmo-mgw-latest/Dockerfile index 27fb2596..4e81a725 100644 --- a/osmo-mgw-latest/Dockerfile +++ b/osmo-mgw-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile index ccc5d80a..12dd1b07 100644 --- a/osmo-mgw-master/Dockerfile +++ b/osmo-mgw-master/Dockerfile @@ -1,12 +1,14 @@ ARG USER ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -21,7 +23,7 @@ RUN case "$DISTRO" in \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN case "$DISTRO" in \ debian*) \ apt-get update && \ diff --git a/osmo-msc-latest/Dockerfile b/osmo-msc-latest/Dockerfile index e52a79ab..2c42e3df 100644 --- a/osmo-msc-latest/Dockerfile +++ b/osmo-msc-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/osmo-msc-master/Dockerfile b/osmo-msc-master/Dockerfile index c7e85089..93d17983 100644 --- a/osmo-msc-master/Dockerfile +++ b/osmo-msc-master/Dockerfile @@ -1,12 +1,14 @@ ARG USER ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -21,7 +23,7 @@ RUN case "$DISTRO" in \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN case "$DISTRO" in \ debian*) \ apt-get update && \ diff --git a/osmo-nitb-latest/Dockerfile b/osmo-nitb-latest/Dockerfile index ccdb75ab..aae7f843 100644 --- a/osmo-nitb-latest/Dockerfile +++ b/osmo-nitb-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/osmo-nitb-master/Dockerfile b/osmo-nitb-master/Dockerfile index edb54342..6542eaf1 100644 --- a/osmo-nitb-master/Dockerfile +++ b/osmo-nitb-master/Dockerfile @@ -1,9 +1,14 @@ ARG USER -FROM $USER/debian-stretch-build +ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" +FROM $USER/$DISTRO-build +# Arguments used after FROM must be specified again +ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -14,7 +19,7 @@ RUN apt-key add /tmp/Release.key && \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN apt-get update && \ apt-get install -y --no-install-recommends \ telnet \ diff --git a/osmo-pcu-latest/Dockerfile b/osmo-pcu-latest/Dockerfile index ad5187e9..c259d3c9 100644 --- a/osmo-pcu-latest/Dockerfile +++ b/osmo-pcu-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -35,4 +37,4 @@ COPY osmo-pcu.cfg /data/osmo-pcu.cfg WORKDIR /data CMD ["/usr/bin/osmo-pcu"] -#EXPOSE +#EXPOSE diff --git a/osmo-pcu-master/Dockerfile b/osmo-pcu-master/Dockerfile index af4426bb..e48de6fc 100644 --- a/osmo-pcu-master/Dockerfile +++ b/osmo-pcu-master/Dockerfile @@ -1,12 +1,14 @@ ARG USER ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -21,7 +23,7 @@ RUN case "$DISTRO" in \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN case "$DISTRO" in \ debian*) \ apt-get update && \ diff --git a/osmo-remsim-latest/Dockerfile b/osmo-remsim-latest/Dockerfile index fdc41ee2..56ae8630 100644 --- a/osmo-remsim-latest/Dockerfile +++ b/osmo-remsim-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -37,4 +39,4 @@ VOLUME /data WORKDIR /data CMD ["/bin/sh", "-c", "/usr/bin/osmo-resmim-server >/data/osmo-resmim-server.log 2>&1"] -#EXPOSE +#EXPOSE diff --git a/osmo-remsim-master/Dockerfile b/osmo-remsim-master/Dockerfile index d50f624c..ac940c01 100644 --- a/osmo-remsim-master/Dockerfile +++ b/osmo-remsim-master/Dockerfile @@ -1,8 +1,10 @@ ARG USER ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte @@ -31,7 +33,7 @@ RUN git clone https://github.com/frankmorgner/vsmartcard.git RUN cd vsmartcard/virtualsmartcard && autoreconf -fi && ./configure && make "-j$(nproc)" install -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -46,7 +48,7 @@ RUN case "$DISTRO" in \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN case "$DISTRO" in \ debian*) \ apt-get update && \ diff --git a/osmo-sgsn-latest/Dockerfile b/osmo-sgsn-latest/Dockerfile index 23a06a13..324b1be2 100644 --- a/osmo-sgsn-latest/Dockerfile +++ b/osmo-sgsn-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index c50b4768..6f55bf95 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -1,12 +1,14 @@ ARG USER ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -21,7 +23,7 @@ RUN case "$DISTRO" in \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN case "$DISTRO" in \ debian*) \ apt-get update && \ diff --git a/osmo-sip-latest/Dockerfile b/osmo-sip-latest/Dockerfile index a310ecde..7b3bc2c4 100644 --- a/osmo-sip-latest/Dockerfile +++ b/osmo-sip-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -31,4 +33,4 @@ COPY osmo-sip-connector.cfg /data/osmo-sip-connector.cfg WORKDIR /data CMD ["/bin/sh", "-c", "/usr/bin/osmo-sip-connector -c /data/osmo-sip-connector.cfg >/data/osmo-sip-connector.log 2>&1"] -#EXPOSE +#EXPOSE diff --git a/osmo-sip-master/Dockerfile b/osmo-sip-master/Dockerfile index e4869799..9793c9cc 100644 --- a/osmo-sip-master/Dockerfile +++ b/osmo-sip-master/Dockerfile @@ -1,12 +1,14 @@ ARG USER ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -21,7 +23,7 @@ RUN case "$DISTRO" in \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN case "$DISTRO" in \ debian*) \ apt-get update && \ diff --git a/osmo-smlc-master/Dockerfile b/osmo-smlc-master/Dockerfile index b820cf6a..c09771d5 100644 --- a/osmo-smlc-master/Dockerfile +++ b/osmo-smlc-master/Dockerfile @@ -1,12 +1,14 @@ ARG USER ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -21,7 +23,7 @@ RUN case "$DISTRO" in \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN case "$DISTRO" in \ debian*) \ apt-get update && \ diff --git a/osmo-stp-latest/Dockerfile b/osmo-stp-latest/Dockerfile index 6651c449..1a55ee86 100644 --- a/osmo-stp-latest/Dockerfile +++ b/osmo-stp-latest/Dockerfile @@ -1,10 +1,12 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" COPY Release.key /tmp/Release.key diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile index bc3e1773..a38b4a8a 100644 --- a/osmo-stp-master/Dockerfile +++ b/osmo-stp-master/Dockerfile @@ -1,12 +1,14 @@ ARG USER ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key @@ -21,7 +23,7 @@ RUN case "$DISTRO" in \ # we need to add this to invalidate the cache once the repository is updated. # unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM ADD $OSMOCOM_REPO/Release /tmp/Release -ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml +ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/CentOS_8_Stream/repodata/repomd.xml /tmp/repomd.xml RUN case "$DISTRO" in \ debian*) \ apt-get update && \ diff --git a/osmo-uecups-master/Dockerfile b/osmo-uecups-master/Dockerfile index 777797f7..fb86563a 100644 --- a/osmo-uecups-master/Dockerfile +++ b/osmo-uecups-master/Dockerfile @@ -1,9 +1,11 @@ ARG USER FROM $USER/debian-buster-build +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_10/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_10/" COPY Release.key /tmp/Release.key diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile index 4a410853..1684acb9 100644 --- a/osmocom-bb-host-master/Dockerfile +++ b/osmocom-bb-host-master/Dockerfile @@ -1,11 +1,16 @@ ARG USER -FROM $USER/debian-stretch-build +ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" +FROM $USER/$DISTRO-build +# Arguments used after FROM must be specified again +ARG DISTRO +ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte ARG OSMO_BB_BRANCH="master" -ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key