osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/41368?usp=email )
Change subject: OBS: build_srcpkg: install rebar3 without apt ......................................................................
OBS: build_srcpkg: install rebar3 without apt
Avoid pulling in 600 MB of GUI dependencies.
Related: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1083096 Change-Id: I9a51df03ac173118c35d501bd21c6d023a436844 --- M scripts/obs/data/build_srcpkg.Dockerfile 1 file changed, 11 insertions(+), 1 deletion(-)
Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified
diff --git a/scripts/obs/data/build_srcpkg.Dockerfile b/scripts/obs/data/build_srcpkg.Dockerfile index 4822450..55fd443 100644 --- a/scripts/obs/data/build_srcpkg.Dockerfile +++ b/scripts/obs/data/build_srcpkg.Dockerfile @@ -11,6 +11,7 @@ debhelper \ dh-python \ dpkg-dev \ + erlang-nox \ fakeroot \ git \ git-review \ @@ -22,11 +23,20 @@ python3-packaging \ python3-setuptools \ quilt \ - rebar3 \ sed \ sphinx-common \ + wget \ && \ apt-get clean
+# Install rebar3 as described in https://rebar3.org/docs/getting-started/ +# instead of using the Debian package, as the latter pulls in ~600 MB of GUI +# dependencies that we don't need: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1083096 +RUN wget https://github.com/erlang/rebar3/releases/download/3.24.0/rebar3 -O /usr/bin/rebar3 && \ + echo "d2d31cfb98904b8e4917300a75f870de12cb5167cd6214d1043e973a56668a54 /usr/bin/rebar3" | sha256sum -c && \ + chmod +x /usr/bin/rebar3 && \ + rebar3 --version + RUN useradd --uid=${UID} -m user USER user