pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/34712?usp=email )


Change subject: WIP: Support debian boowkorm
......................................................................

WIP: Support debian boowkorm

Change-Id: Ib11a55294b525e3c3806246b133f8e479554a068
---
M open5gs-latest/Dockerfile
1 file changed, 36 insertions(+), 7 deletions(-)



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

diff --git a/open5gs-latest/Dockerfile b/open5gs-latest/Dockerfile
index 7c385e2..c395d9c 100644
--- a/open5gs-latest/Dockerfile
+++ b/open5gs-latest/Dockerfile
@@ -1,8 +1,12 @@
 ARG    REGISTRY=docker.io
-FROM   ${REGISTRY}/debian:bullseye
+ARG    UPSTREAM_DISTRO=debian:bookworm
+FROM   ${REGISTRY}/${UPSTREAM_DISTRO}
+# Arguments used after FROM must be specified again
+ARG    DISTRO
+
 ARG    OPEN5GS_REPO_HOST="https://download.opensuse.org";
 ARG    OPEN5GS_REPO_PATH="repositories/home:/acetcom:/open5gs:"
-ARG    
OPEN5GS_REPO="${OPEN5GS_REPO_HOST}/${OPEN5GS_REPO_PATH}/latest/Debian_11"
+ARG    
OPEN5GS_REPO="${OPEN5GS_REPO_HOST}/${OPEN5GS_REPO_PATH}/latest/Debian_12"
 ARG    OPEN5GS_KEY=/usr/share/keyrings/open5gs-latest.asc
 ARG    MONGODB_KEY=/usr/share/keyrings/mongodb-org.asc

@@ -18,13 +22,29 @@
                sudo \
                wget

+RUN    wget "https://pgp.mongodb.com/server-5.0.asc"; -O "$MONGODB_KEY"
+RUN    case "$DISTRO" in \
+       debian-*) \
+               DEBIAN_VERSION=$(echo "$DISTRO" | cut -d "-" -f2); \
+       if [ "x${DEBIAN_VERSION}" = "xbookworm" ]; then \
+               echo "Using bullseye since bookworm mongodb-org package is not 
available. Furthermore, manually install required libssl1.1." && \
+               DEBIAN_VERSION="bullseye" && \
+               wget 
"http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb10u6_amd64.deb";
 && \
+               dpkg -i "libssl1.1_1.1.1n-0+deb10u6_amd64.deb" && \
+               rm "libssl1.1_1.1.1n-0+deb10u6_amd64.deb"; \
+       fi; \
+       echo "deb [signed-by=$MONGODB_KEY] http://repo.mongodb.org/apt/debian 
${DEBIAN_VERSION}/mongodb-org/5.0 main" \
+               > /etc/apt/sources.list.d/mongodb-org.list \
+               ;; \
+       centos*) \
+       echo "TODO: centos" && \
+               exit 1 \
+               ;; \
+       esac
+
 RUN    echo "deb [signed-by=$OPEN5GS_KEY] $OPEN5GS_REPO/ ./" \
                > /etc/apt/sources.list.d/open5gs.list
-RUN    echo "deb [signed-by=$MONGODB_KEY] http://repo.mongodb.org/apt/debian 
bullseye/mongodb-org/5.0 main" \
-               > /etc/apt/sources.list.d/mongodb-org.list
-
-RUN    wget "$OPEN5GS_REPO/Release.key" -O "$OPEN5GS_KEY" && \
-       wget "https://pgp.mongodb.com/server-5.0.asc"; -O "$MONGODB_KEY"
+RUN    wget "$OPEN5GS_REPO/Release.key" -O "$OPEN5GS_KEY"

 RUN    apt-get update && \
        apt-get install -y \

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ib11a55294b525e3c3806246b133f8e479554a068
Gerrit-Change-Number: 34712
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to