Change in docker-playground[master]: osmo-*-latest: support centos8

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/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Thu Mar 4 14:08:50 UTC 2021


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/23237 )


Change subject: osmo-*-latest: support centos8
......................................................................

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
---
A centos8-obs-latest/Dockerfile
A centos8-obs-latest/Makefile
M jenkins-common.sh
M osmo-bsc-latest/Dockerfile
M osmo-bts-latest/Dockerfile
M osmo-cbc-latest/Dockerfile
M osmo-gbproxy-latest/Dockerfile
M osmo-ggsn-latest/Dockerfile
M osmo-hlr-latest/Dockerfile
M osmo-mgw-latest/Dockerfile
M osmo-msc-latest/Dockerfile
M osmo-nitb-latest/Dockerfile
M osmo-pcu-latest/Dockerfile
M osmo-sgsn-latest/Dockerfile
M osmo-sip-latest/Dockerfile
M osmo-smlc-latest/Dockerfile
M osmo-stp-latest/Dockerfile
17 files changed, 205 insertions(+), 67 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/37/23237/1

diff --git a/centos8-obs-latest/Dockerfile b/centos8-obs-latest/Dockerfile
new file mode 100644
index 0000000..4b2357b
--- /dev/null
+++ b/centos8-obs-latest/Dockerfile
@@ -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
diff --git a/centos8-obs-latest/Makefile b/centos8-obs-latest/Makefile
new file mode 100644
index 0000000..cba5cee
--- /dev/null
+++ b/centos8-obs-latest/Makefile
@@ -0,0 +1,3 @@
+UPSTREAM_DISTRO:=centos:centos8
+DISTRO:=centos8
+include ../make/Makefile
diff --git a/jenkins-common.sh b/jenkins-common.sh
index b8fc3a2..6c27fae 100644
--- a/jenkins-common.sh
+++ b/jenkins-common.sh
@@ -7,6 +7,7 @@
 
 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" ;;
diff --git a/osmo-bsc-latest/Dockerfile b/osmo-bsc-latest/Dockerfile
index bbc3934..3352ed2 100644
--- a/osmo-bsc-latest/Dockerfile
+++ b/osmo-bsc-latest/Dockerfile
@@ -2,12 +2,22 @@
 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
 
diff --git a/osmo-bts-latest/Dockerfile b/osmo-bts-latest/Dockerfile
index b576e72..6e835d5 100644
--- a/osmo-bts-latest/Dockerfile
+++ b/osmo-bts-latest/Dockerfile
@@ -2,12 +2,22 @@
 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
 
diff --git a/osmo-cbc-latest/Dockerfile b/osmo-cbc-latest/Dockerfile
index 91458d8..d919dae 100644
--- a/osmo-cbc-latest/Dockerfile
+++ b/osmo-cbc-latest/Dockerfile
@@ -2,11 +2,20 @@
 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
 
diff --git a/osmo-gbproxy-latest/Dockerfile b/osmo-gbproxy-latest/Dockerfile
index 22904a1..7c729a5 100644
--- a/osmo-gbproxy-latest/Dockerfile
+++ b/osmo-gbproxy-latest/Dockerfile
@@ -2,6 +2,7 @@
 ARG	DISTRO
 FROM	$USER/$DISTRO-obs-latest
 # Arguments used after FROM must be specified again
+ARG	DISTRO
 
 RUN	case "$DISTRO" in \
 	debian*) \
diff --git a/osmo-ggsn-latest/Dockerfile b/osmo-ggsn-latest/Dockerfile
index 82bbef2..0da9703 100644
--- a/osmo-ggsn-latest/Dockerfile
+++ b/osmo-ggsn-latest/Dockerfile
@@ -2,28 +2,38 @@
 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
 
diff --git a/osmo-hlr-latest/Dockerfile b/osmo-hlr-latest/Dockerfile
index ed83ac3..ece7aa6 100644
--- a/osmo-hlr-latest/Dockerfile
+++ b/osmo-hlr-latest/Dockerfile
@@ -2,12 +2,21 @@
 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
 
diff --git a/osmo-mgw-latest/Dockerfile b/osmo-mgw-latest/Dockerfile
index 52cca6e..5b01fe8 100644
--- a/osmo-mgw-latest/Dockerfile
+++ b/osmo-mgw-latest/Dockerfile
@@ -2,11 +2,20 @@
 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
 
diff --git a/osmo-msc-latest/Dockerfile b/osmo-msc-latest/Dockerfile
index 4ff86d3..d2c1107 100644
--- a/osmo-msc-latest/Dockerfile
+++ b/osmo-msc-latest/Dockerfile
@@ -2,11 +2,20 @@
 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
 
diff --git a/osmo-nitb-latest/Dockerfile b/osmo-nitb-latest/Dockerfile
index c711f8d..8c3acb8 100644
--- a/osmo-nitb-latest/Dockerfile
+++ b/osmo-nitb-latest/Dockerfile
@@ -2,6 +2,7 @@
 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 \
diff --git a/osmo-pcu-latest/Dockerfile b/osmo-pcu-latest/Dockerfile
index 4714bf2..622f933 100644
--- a/osmo-pcu-latest/Dockerfile
+++ b/osmo-pcu-latest/Dockerfile
@@ -2,11 +2,20 @@
 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
 
diff --git a/osmo-sgsn-latest/Dockerfile b/osmo-sgsn-latest/Dockerfile
index c3b1410..21728c9 100644
--- a/osmo-sgsn-latest/Dockerfile
+++ b/osmo-sgsn-latest/Dockerfile
@@ -2,11 +2,20 @@
 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
 
diff --git a/osmo-sip-latest/Dockerfile b/osmo-sip-latest/Dockerfile
index 79dbf55..825735c 100644
--- a/osmo-sip-latest/Dockerfile
+++ b/osmo-sip-latest/Dockerfile
@@ -2,11 +2,20 @@
 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
 
diff --git a/osmo-smlc-latest/Dockerfile b/osmo-smlc-latest/Dockerfile
index 51e290a..12487ec 100644
--- a/osmo-smlc-latest/Dockerfile
+++ b/osmo-smlc-latest/Dockerfile
@@ -2,11 +2,20 @@
 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
 
diff --git a/osmo-stp-latest/Dockerfile b/osmo-stp-latest/Dockerfile
index c139af4..d3279f0 100644
--- a/osmo-stp-latest/Dockerfile
+++ b/osmo-stp-latest/Dockerfile
@@ -2,11 +2,20 @@
 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
 

-- 
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/23237
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I274b31d4903df07e99fd434af25bdb72991f6923
Gerrit-Change-Number: 23237
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210304/6d345864/attachment.htm>


More information about the gerrit-log mailing list