diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-11-18 17:52:56 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-12-02 14:27:02 +0100 |
commit | 7d7a06b749fbfefdb55b9dff3b727d17a38004f5 (patch) | |
tree | 606a7aeadf45fe56639b1ef9cd9d6a5aba2b53aa /osmo-hnbgw-master | |
parent | 78ae9377a743db01c6d1b26daf563ef2f8f7eb6e (diff) |
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
Diffstat (limited to 'osmo-hnbgw-master')
-rw-r--r-- | osmo-hnbgw-master/Dockerfile | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index 2e7b0b7..46d5fe5 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 <laforge@gnumonks.org> -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 \ |