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
This commit is contained in:
Oliver Smith 2021-03-03 14:58:29 +01:00
parent effdb1a452
commit 69b3ecb912
17 changed files with 205 additions and 67 deletions

View File

@ -0,0 +1,21 @@
ARG REGISTRY=docker.io
ARG UPSTREAM_DISTRO=centos:centos8
FROM ${REGISTRY}/${UPSTREAM_DISTRO}
# Arguments used after FROM must be specified again
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
# Let package metadata expire after 60 seconds instead of 48 hours
RUN echo "metadata_expire=60" >> /etc/dnf/dnf.conf && cat /etc/dnf/dnf.conf
# Make additional development libraries available from PowerTools and set up
# Osmocom latest OBS repository
RUN dnf install -y dnf-utils wget && \
yum config-manager --set-enabled powertools && \
cd /etc/yum.repos.d/ && \
wget $OSMOCOM_REPO_MIRROR/repositories/network:osmocom:latest/CentOS_8/network:osmocom:latest.repo
RUN dnf install -y \
telnet
# Invalidate cache once the repository is updated
ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/CentOS_8/repodata/repomd.xml /tmp/repomd.xml

View File

@ -0,0 +1,3 @@
UPSTREAM_DISTRO:=centos:centos8
DISTRO:=centos8
include ../make/Makefile

View File

@ -7,6 +7,7 @@ docker_image_exists() {
docker_depends() {
case "$1" in
osmo-*-latest-centos8) echo "centos8-obs-latest" ;;
osmo-*-centos8) echo "centos8-build" ;;
osmo-*-latest) echo "debian-stretch-obs-latest" ;;
osmo-*) echo "debian-stretch-build" ;;

View File

@ -2,12 +2,22 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN apt-get update && \
apt-get install -y --no-install-recommends \
osmo-bsc \
osmo-bsc-ipaccess-utils && \
apt-get clean
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
apt-get install -y --no-install-recommends \
osmo-bsc \
osmo-bsc-ipaccess-utils && \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-bsc \
osmo-bsc-ipaccess-utils \
;; \
esac
WORKDIR /tmp

View File

@ -2,12 +2,22 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN apt-get update && \
apt-get install -y --no-install-recommends \
osmo-bts-trx \
osmo-bts-virtual && \
apt-get clean
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
apt-get install -y --no-install-recommends \
osmo-bts-trx \
osmo-bts-virtual && \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-bts \
osmo-bts-virtual \
;; \
esac
ADD respawn.sh /usr/local/bin/respawn.sh

View File

@ -2,11 +2,20 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN apt-get update && \
apt-get install -y --no-install-recommends \
osmo-cbc && \
apt-get clean
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
apt-get install -y --no-install-recommends \
osmo-cbc && \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-cbc \
;; \
esac
WORKDIR /data

View File

@ -2,6 +2,7 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN case "$DISTRO" in \
debian*) \

View File

@ -2,28 +2,38 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
# Install additional debian depends for kernel module test (OS#3208)
# Disable update-initramfs to save time during apt-get install
RUN ln -s /bin/true /usr/local/bin/update-initramfs && \
apt-get update && \
apt-get install -y --no-install-recommends \
bc \
bison \
bridge-utils \
busybox-static \
ca-certificates \
flex \
gcc \
git \
libc6-dev \
libelf-dev \
libssl-dev \
linux-image-amd64 \
make \
osmo-ggsn \
pax-utils \
qemu-system-x86 && \
apt-get clean
RUN case "$DISTRO" in \
debian*) \
ln -s /bin/true /usr/local/bin/update-initramfs && \
apt-get update && \
apt-get install -y --no-install-recommends \
bc \
bison \
bridge-utils \
busybox-static \
ca-certificates \
flex \
gcc \
git \
libc6-dev \
libelf-dev \
libssl-dev \
linux-image-amd64 \
make \
osmo-ggsn \
pax-utils \
qemu-system-x86 && \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-ggsn \
;; \
esac
WORKDIR /tmp

View File

@ -2,12 +2,21 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libdbd-sqlite3 \
osmo-hlr && \
apt-get clean
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
apt-get install -y --no-install-recommends \
libdbd-sqlite3 \
osmo-hlr && \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-hlr \
;; \
esac
WORKDIR /tmp

View File

@ -2,11 +2,20 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN apt-get update && \
apt-get install -y --no-install-recommends \
osmo-mgw && \
apt-get clean
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
apt-get install -y --no-install-recommends \
osmo-mgw && \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-mgw \
;; \
esac
WORKDIR /tmp

View File

@ -2,11 +2,20 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN apt-get update && \
apt-get install -y --no-install-recommends \
osmo-msc && \
apt-get clean
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
apt-get install -y --no-install-recommends \
osmo-msc && \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-msc \
;; \
esac
WORKDIR /tmp

View File

@ -2,6 +2,7 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN apt-get update && \
apt-get install -y --no-install-recommends \

View File

@ -2,11 +2,20 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN apt-get update && \
apt-get install -y --no-install-recommends \
osmo-pcu && \
apt-get clean
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
apt-get install -y --no-install-recommends \
osmo-pcu && \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-pcu \
;; \
esac
ADD respawn.sh /usr/local/bin/respawn.sh

View File

@ -2,11 +2,20 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN apt-get update && \
apt-get install -y --no-install-recommends \
osmo-sgsn && \
apt-get clean
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
apt-get install -y --no-install-recommends \
osmo-sgsn && \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-sgsn \
;; \
esac
WORKDIR /tmp

View File

@ -2,11 +2,20 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN apt-get update && \
apt-get install -y --no-install-recommends \
osmo-sip-connector && \
apt-get clean
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
apt-get install -y --no-install-recommends \
osmo-sip-connector && \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-sip-connector \
;; \
esac
WORKDIR /tmp

View File

@ -2,11 +2,20 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN apt-get update && \
apt-get install -y --no-install-recommends \
osmo-smlc && \
apt-get clean
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
apt-get install -y --no-install-recommends \
osmo-smlc && \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-smlc \
;; \
esac
WORKDIR /data

View File

@ -2,11 +2,20 @@ ARG USER
ARG DISTRO
FROM $USER/$DISTRO-obs-latest
# Arguments used after FROM must be specified again
ARG DISTRO
RUN apt-get update && \
apt-get install -y --no-install-recommends \
osmo-stp && \
apt-get clean
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
apt-get install -y --no-install-recommends \
osmo-stp && \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-stp \
;; \
esac
WORKDIR /data