fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/27070 )
Change subject: open5gs-master: install dependencies using mk-build-deps ......................................................................
open5gs-master: install dependencies using mk-build-deps
This is a 3-rd party project, which may introduce new dependencies in the future. Rather than maintaining our own list of packages to install, let's employ mk-build-deps. This tool parses 'debian/control' and installs all dependencies automatically.
Change-Id: I71ad7256116ee30f15aff38fd38588aa2bfab456 Related: SYS#5602 --- M open5gs-master/Dockerfile 1 file changed, 11 insertions(+), 24 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/70/27070/1
diff --git a/open5gs-master/Dockerfile b/open5gs-master/Dockerfile index eec8d71..98af726 100644 --- a/open5gs-master/Dockerfile +++ b/open5gs-master/Dockerfile @@ -6,31 +6,11 @@
RUN apt-get update && \ apt-get upgrade -y && \ - apt-get install -y --no-install-recommends \ - meson \ - ninja-build \ - libsctp-dev \ - libgnutls28-dev \ - libgcrypt-dev \ - libssl-dev \ - libidn11-dev \ - libmongoc-dev \ - libbson-dev \ - libyaml-dev \ - libnghttp2-dev \ - libmicrohttpd-dev \ - libcurl4-gnutls-dev \ - iproute2 \ - ca-certificates \ - netbase && \ - apt-get clean - -RUN apt-get update && \ - apt-get upgrade -y && \ DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \ vim \ sudo \ + iproute2 \ iputils-ping \ net-tools && \ apt-get clean @@ -44,14 +24,21 @@ WORKDIR /home/${username}
-# build + install open5gs - +# clone open5gs ARG GITHUB_USER=open5gs ARG GITHUB_REPO=open5gs ARG OPEN5GS_BRANCH=main RUN git clone https://github.com/$GITHUB_USER/$GITHUB_REPO ADD https://api.github.com/repos/$GITHUB_USER/$GITHUB_REPO/git/refs/heads/$OPEN5... /root/open5gs-ver.json
+# update the source code (if needed) RUN cd $GITHUB_REPO && \ - git fetch && git checkout -f -B $OPEN5GS_BRANCH origin/$OPEN5GS_BRANCH && \ + git fetch && git checkout -f -B $OPEN5GS_BRANCH origin/$OPEN5GS_BRANCH + +# install dependencies specified in debian/control +RUN cd $GITHUB_REPO && \ + mk-build-deps -i -r -t 'apt-get --no-install-recommends -yV' + +# build + install open5gs +RUN cd $GITHUB_REPO && \ meson build && ninja -C build install