diff options
author | Harald Welte <laforge@gnumonks.org> | 2020-10-16 11:10:08 +0000 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-10-16 13:13:08 +0200 |
commit | 0cb56e4bc79ddf50a31c51e4abee1b200b49cbde (patch) | |
tree | 2591b8a7e0508eaa6766484938bec3f9eb6b8dfb /osmo-sgsn-master | |
parent | 687ea83fc6925bc933694c2355d775cf61d88d1e (diff) |
osmo-*-master: Invalidate docker cache when CentOS repo changes
We currently only invalidate the cache if the Debian repository changes,
but not if the CentOS repository changes. This leads to strange
artefacts, such as CentOS containers for osmo-bts-master using an
old libosmocore, despite a new one being available in the repo.
As Dockerfiles don't support conditional "ADD", we need to actually
add both the CentOS and the Debian repsotiry file, so any change
in either of the two will now (unneccessarily) invalidate the cache
for both Debian and CentOS builds.
Change-Id: I7b13644afb9d3be3b94184193177e003c13718d3
Diffstat (limited to 'osmo-sgsn-master')
-rw-r--r-- | osmo-sgsn-master/Dockerfile | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index 58da791..c50b476 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -18,7 +18,10 @@ RUN case "$DISTRO" in \ ;; \ esac +# 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 RUN case "$DISTRO" in \ debian*) \ apt-get update && \ |