Change in docker-playground[master]: *-bts-*: 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
Fri May 29 10:38:24 UTC 2020


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


Change subject: *-bts-*: support centos8
......................................................................

*-bts-*: support centos8

Related: OS#4564
Change-Id: I38a0b9d01cfa1112b9039682f627115ad5d3022d
---
M osmo-bts-master/Dockerfile
M osmocom-bb-host-master/Dockerfile
M ttcn3-bts-test/Dockerfile
M ttcn3-bts-test/jenkins.sh
4 files changed, 81 insertions(+), 31 deletions(-)



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

diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile
index b73f2ac..e0d766b 100644
--- a/osmo-bts-master/Dockerfile
+++ b/osmo-bts-master/Dockerfile
@@ -1,5 +1,9 @@
 ARG	USER
-FROM	$USER/debian-stretch-build
+ARG	DISTRO
+ARG	DOCKER_TAG
+FROM	$USER/$DISTRO-build:$DOCKER_TAG
+# Arguments used after FROM must be specified again
+ARG	DISTRO
 
 MAINTAINER Harald Welte <laforge at gnumonks.org>
 
@@ -7,21 +11,42 @@
 
 COPY	Release.key /tmp/Release.key
 
-RUN	apt-key add /tmp/Release.key && \
-	rm /tmp/Release.key && \
-	echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-nightly.list
+RUN	case "$DISTRO" in \
+	debian*) \
+		apt-key add /tmp/Release.key && \
+		rm /tmp/Release.key && \
+		echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-nightly.list; \
+		;; \
+	esac
 
 ADD	$OSMOCOM_REPO/Release /tmp/Release
-RUN	apt-get update && \
-	apt-get install -y --no-install-recommends \
-		telnet \
-		libosmocore-dev \
-		libosmo-abis-dev \
-		libosmo-netif-dev \
-		libosmo-sccp-dev \
-		libsmpp34-dev \
-		libgtp-dev && \
-	apt-get clean
+RUN	case "$DISTRO" in \
+	debian*) \
+		apt-get update && \
+		apt-get install -y --no-install-recommends \
+			telnet \
+			libosmocore-dev \
+			libosmo-abis-dev \
+			libosmo-netif-dev \
+			libosmo-sccp-dev \
+			libsmpp34-dev \
+			libgtp-dev && \
+		apt-get clean \
+		;; \
+	centos*) \
+		dnf install -y \
+			"pkgconfig(libosmoabis)" \
+			"pkgconfig(libosmocodec)" \
+			"pkgconfig(libosmocoding)" \
+			"pkgconfig(libosmocore)" \
+			"pkgconfig(libosmoctrl)" \
+			"pkgconfig(libosmogb)" \
+			"pkgconfig(libosmogsm)" \
+			"pkgconfig(libosmotrau)" \
+			"pkgconfig(libosmovty)" \
+			telnet \
+		;; \
+	esac
 
 ADD	respawn.sh /usr/local/bin/respawn.sh
 
diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile
index 1d79f06..14ed909 100644
--- a/osmocom-bb-host-master/Dockerfile
+++ b/osmocom-bb-host-master/Dockerfile
@@ -1,5 +1,9 @@
 ARG	USER
-FROM	$USER/debian-stretch-build
+ARG	DISTRO
+ARG	DOCKER_TAG
+FROM	$USER/$DISTRO-build:$DOCKER_TAG
+# Arguments used after FROM must be specified again
+ARG	DISTRO
 
 MAINTAINER Harald Welte <laforge at gnumonks.org>
 
@@ -9,16 +13,35 @@
 
 COPY	Release.key /tmp/Release.key
 
-RUN	apt-key add /tmp/Release.key && \
-	rm /tmp/Release.key && \
-	echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-nightly.list
+RUN	case "$DISTRO" in \
+	debian*) \
+		apt-key add /tmp/Release.key && \
+		rm /tmp/Release.key && \
+		echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-nightly.list; \
+		;; \
+	esac
 
 # python-enum34 is a dependecy of fake_trx as long we're using python2
 ADD	$OSMOCOM_REPO/Release /tmp/Release
-RUN	apt-get update && \
-	apt-get install -y --no-install-recommends \
-		libosmocore-dev python-enum34 && \
-	apt-get clean
+RUN	case "$DISTRO" in \
+	debian*) \
+		apt-get update && \
+		apt-get install -y --no-install-recommends \
+			libosmocore-dev \
+			python-enum34 && \
+		apt-get clean \
+		;; \
+	centos*) \
+		dnf install -y \
+			python2 \
+			"pkgconfig(libosmocodec)" \
+			"pkgconfig(libosmocoding)" \
+			"pkgconfig(libosmocore)" \
+			"pkgconfig(libosmogb)" \
+			"pkgconfig(libosmogsm)" \
+			"pkgconfig(libosmovty)" \
+		;; \
+	esac
 
 WORKDIR	/tmp
 
diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile
index 29185c8..c0fea72 100644
--- a/ttcn3-bts-test/Dockerfile
+++ b/ttcn3-bts-test/Dockerfile
@@ -1,5 +1,7 @@
 ARG	USER
-FROM	$USER/debian-stretch-titan
+ARG	DISTRO
+ARG	DOCKER_TAG
+FROM	$USER/$DISTRO-titan:$DOCKER_TAG
 
 RUN	mkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUN	git clone git://git.osmocom.org/osmo-ttcn3-hacks.git
diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh
index 00e8133..6dab7c2 100755
--- a/ttcn3-bts-test/jenkins.sh
+++ b/ttcn3-bts-test/jenkins.sh
@@ -4,11 +4,11 @@
 IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
 # NOTE: there is no osmocom-bb-host-latest, hence always use master!
 docker_images_require \
-	"debian-stretch-build" \
+	"$DISTRO-build" \
 	"osmo-bsc-$IMAGE_SUFFIX" \
 	"osmo-bts-$IMAGE_SUFFIX" \
 	"osmocom-bb-host-master" \
-	"debian-stretch-titan" \
+	"$DISTRO-titan" \
 	"ttcn3-bts-test"
 
 start_bsc() {
@@ -18,7 +18,7 @@
 			-v $VOL_BASE_DIR/bsc:/data \
 			--name ${BUILD_TAG}-bsc -d \
 			$DOCKER_ARGS \
-			$REPO_USER/osmo-bsc-$IMAGE_SUFFIX \
+			$REPO_USER/osmo-bsc-$IMAGE_SUFFIX:$DOCKER_TAG \
 			/bin/sh -c "osmo-bsc -c /data/osmo-bsc.cfg >>/data/osmo-bsc.log 2>&1"
 }
 
@@ -36,7 +36,7 @@
 			-v $VOL_BASE_DIR/unix:/data/unix \
 			--name ${BUILD_TAG}-bts -d \
 			$DOCKER_ARGS \
-			$REPO_USER/osmo-bts-$IMAGE_SUFFIX \
+			$REPO_USER/osmo-bts-$IMAGE_SUFFIX:$DOCKER_TAG \
 			/bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-$variant -c /data/osmo-bts.cfg -i 172.18.9.10 >>/data/osmo-bts.log 2>&1"
 }
 
@@ -47,7 +47,7 @@
 			-v $VOL_BASE_DIR/fake_trx:/data \
 			--name ${BUILD_TAG}-fake_trx -d \
 			$DOCKER_ARGS \
-			$REPO_USER/osmocom-bb-host-master \
+			$REPO_USER/osmocom-bb-host-master:$DOCKER_TAG \
 			/tmp/osmocom-bb/src/target/trx_toolkit/fake_trx.py \
 				--log-file-name /data/fake_trx.log \
 				--log-file-level DEBUG \
@@ -64,7 +64,7 @@
 			-v $VOL_BASE_DIR/unix:/data/unix \
 			--name ${BUILD_TAG}-trxcon -d \
 			$DOCKER_ARGS \
-			$REPO_USER/osmocom-bb-host-master \
+			$REPO_USER/osmocom-bb-host-master:$DOCKER_TAG \
 			/bin/sh -c "trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 >>/data/trxcon.log 2>&1"
 }
 
@@ -75,7 +75,7 @@
 			-v $VOL_BASE_DIR/unix:/data/unix \
 			--name ${BUILD_TAG}-virtphy -d \
 			$DOCKER_ARGS \
-			$REPO_USER/osmocom-bb-host-master \
+			$REPO_USER/osmocom-bb-host-master:$DOCKER_TAG \
 			virtphy -s /data/unix/osmocom_l2
 			/bin/sh -c "virtphy -s /data/unix/osmocom_l2 >>/data/virtphy.log 2>&1"
 }
@@ -89,7 +89,7 @@
 			-v $VOL_BASE_DIR/unix:/data/unix \
 			--name ${BUILD_TAG}-ttcn3-bts-test \
 			$DOCKER_ARGS \
-			$REPO_USER/ttcn3-bts-test
+			$REPO_USER/ttcn3-bts-test:$DOCKER_TAG
 }
 
 network_create 172.18.9.0/24

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I38a0b9d01cfa1112b9039682f627115ad5d3022d
Gerrit-Change-Number: 18576
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/20200529/a486ab37/attachment.htm>


More information about the gerrit-log mailing list