Make docker rebuild if apt repository changes

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Sat Jan 13 13:02:11 UTC 2018


Hi Neels,

I've seen some discusion (unfortunately on the sysmocom internal jaberr room,
not on a public osmocom channel) related to the docker based jenkins verification
jobs as follows:

ADD http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/Release /tmp/Release
RUN apt-get update && apt-get install -y --no-install-recommends libosmocore-dev

The "ADD" line will check if the "Release" file of the repository has changed.
If yes, the cache will be invalidated, and the following line[s] will be re-run.
If no, then the cache will remain.

It's sub-optimal in that any change to the repository (even those that are
unrelated to the packages used, [libosmocore-dev in this example]) will trigger
an image re-build.  But at least it will guarantee that any update to the
libosmocore-dev package will trigger an image rebuild.

See http://git.osmocom.org/docker-playground/tree/osmo-stp-master/Dockerfile for
a real-world example

Regards,
	Harald
-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)



More information about the OpenBSC mailing list