aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2023-10-16 15:14:04 +0200
committerOliver Smith <osmith@sysmocom.de>2023-10-16 15:19:18 +0200
commit01c04193f79a67bf07fafe1698540a8e8830691f (patch)
treec08885a9a25d471d9b4a2b6e2627975761db3735
parentba1385fe60755099caff591adadf66bce27946a8 (diff)
debian-bookworm-erlang: use debian's rebar3
Use debian's version of rebar3 instead of downloading a binary. This was useful when the container was based on debian 11 where rebar3 wasn't in debian's repositories. Debian 12 has version 3.19.0. This also solves a caching problem on one of the jenkins nodes, which currently fails at this line: ADD https://github.com/erlang/rebar3/archive/refs/tags/${REBAR3_VERSION}.tar.gz /tmp/rebar3.tar.gz with: ERROR: failed to solve: failed to load cache key: invalid not-modified ETag: "fce57989250a021a2be5fe5eddd655d6d415eef04f769bf1437f3d6dddfa5559" My understanding is that docker has cached an ETag that is no longer valid / maybe the format changed - and instead of simply requesting the file again, it just fails there. Related: https://en.wikipedia.org/wiki/HTTP_ETag Change-Id: I69e02d004a0bd6f9d3a462f4e184b3e9361cc7fe
-rw-r--r--debian-bookworm-erlang/Dockerfile13
1 files changed, 2 insertions, 11 deletions
diff --git a/debian-bookworm-erlang/Dockerfile b/debian-bookworm-erlang/Dockerfile
index 811500e..ec5ed52 100644
--- a/debian-bookworm-erlang/Dockerfile
+++ b/debian-bookworm-erlang/Dockerfile
@@ -8,25 +8,16 @@ ARG OSMOCOM_REPO_PATH="packages/osmocom:"
ARG OSMOCOM_REPO="${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/latest/Debian_12/"
ARG UID
-# Install the erlang vm and rebar (2)
+# Install the erlang vm and rebar (2 and 3)
RUN set -x && \
apt-get update && \
apt-get install -y --no-install-recommends \
erlang \
rebar \
+ rebar3 \
&& \
apt-get clean
-# Add rebar3
-ARG REBAR3_VERSION="3.18.0"
-ADD https://github.com/erlang/rebar3/archive/refs/tags/${REBAR3_VERSION}.tar.gz /tmp/rebar3.tar.gz
-RUN set -x && \
- tar -zxf /tmp/rebar3.tar.gz && \
- cd rebar3-${REBAR3_VERSION} && \
- ./bootstrap && \
- install -Dm0755 "rebar3" "/usr/bin/rebar3" && \
- rm /tmp/rebar3.tar.gz
-
# Install minimal build utilities as well as system utilities
RUN set -x && \
apt-get update && \