Commit Graph

9 Commits

Author SHA1 Message Date
Vadim Yanitskiy 085656ac45 Make respawn.sh a common part of *-build/-obs images
Maintaining several versions of the same file in different folders
is a bad idea, because at some point their content gets out of sync.
This is exactly what happened to 'respawn.sh': sleep()ing was only
implemented in 'osmo-bts-master/respawn.sh', other versions of this
file would simply ignore '$SLEEP_BEFORE_RESPAWN'.

The easiest solution would be to have all common files in a single
directory, however Docker does not allow to ADD files from outside
of the build context.  In other words, all files must be in the
same directory as the Dockerfile itself.

Modify 'make/Makefile' in order to copy the contents of common
directory to the current build context ('pre-build' target) and
remove it after building ('post-build' target).

Change-Id: I3ec86c8610b3b43d39ea8e3da444861d317ced4e
2021-03-10 18:46:29 +01:00
Vadim Yanitskiy d02d4e036c fix ttcn3-bsc-test under CentOS: install missing osmo-bts-omldummy
In binary packages for Debian, osmo-bts-omldummy is (for some reason)
part of 'osmo-bts-virtual' package.  For CentOS this binary is
shipped properly in a separate package, so let's install it.

This change fixes ttcn3-bsc-test under CentOS failing with:

  /usr/local/bin/respawn.sh: line 9: osmo-bts-omldummy: command not found

Change-Id: Ibbfd88d914a31dcfd3e33c6025d612d456b6b124
2021-03-09 12:04:33 +01:00
Oliver Smith 69b3ecb912 osmo-*-latest: support centos8
Add a new centos8-obs-latest container with shared code (just like
debian-stretch-obs-latest) and adjust the package install blocks in
osmo-*-latest.

Related: OS#5049
Change-Id: I274b31d4903df07e99fd434af25bdb72991f6923
2021-03-04 14:42:32 +01:00
Oliver Smith effdb1a452 debian-stretch-obs-latest: new container
Move common code from osmo-*-latest to debian-stretch-obs-latest:
* add the OBS repository key
* add the OBS repository with "latest" feed
* install telnet
* invalidate the cache once the repository is updated

This is in preparation to make osmo-*-latest work with centos8,
preventing the following issues we would have without this refactoring:
* avoid need to read the repository index of both debian-stretch and
  centos8, and to invalidate the cache if either of them changes
  (instead of just the relevant one). This is currently a problem in
  osmo-*-master/Dockerfile, Id69f3eaf37f823bac0947366f27a25edd277a4cb
  will fix it there.
* no need to add boilerplate code to install the centos8 repository to
  each osmo-*-latest/Dockerfile

While at it, also remove deprecated MAINTAINER lines.

Related: OS#5049
Related: https://docs.docker.com/engine/reference/builder/#maintainer-deprecated
Change-Id: I443d52eba416ea298cc5421e280ad2f4ca59283b
2021-03-04 14:39:46 +01:00
Pau Espin 7d7a06b749 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
2020-12-02 14:27:02 +01:00
Pau Espin 78ae9377a7 common: Automatize UPSTREAM_DISTRO name based on image name
Similar to what is already done with DISTRO, which points to given image
of ours based on name. This time we do the same with upstream images,
such as debian:stretch or centos:centos8.

This way, for instance calling docker_images_require
"osmo-bsc-latest-centos8" would try to build the
osmo-bsc-latest/Dockerfile file starting from a centos8 image.

Change-Id: I33cb21aa024396974559fd98f9f3c64e2c351eda
2020-12-01 11:46:20 +00:00
Harald Welte 027826fdba 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
2020-11-02 17:02:26 +01:00
Pau Espin a9877bf487 Update osmo-*/Dockerfile to log stdout+stderr of process to log file
This way we get VTY parsing failures as well as backtraces upon process
crash.

Related: OS#4212
Change-Id: I9493ff73ef27c7c6d32b00cf827704b3f9cbf86a
2019-11-19 18:29:00 +00:00
Harald Welte a421358ab8 Add osmo-*-latest Dockerfiles
Those containers are using the OBS-built "latest" packages on Debian 9

Change-Id: I6a564206dd81743deb1eb27eca7081bc333d7434
2018-05-04 18:12:37 +02:00