Skip to content

Commit

Permalink
Bump Elixir so we can specify the OTP version
Browse files Browse the repository at this point in the history
The `1.13.x` `elixir` releases have a single precompiled file. But it's
not clear which OTP release they're compiled against.

The `1.14.x` `elixir` releases have multiple precompiled binaries for
OTP 23, 24, and 25. So we can specify which binary to pull to guarantee
it aligns with the Erlang version we're using.
  • Loading branch information
jeffwidman committed Nov 1, 2022
1 parent 425637b commit 45f52b3
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,18 @@ RUN cd /tmp \
# Install Erlang, Elixir and Hex
ENV PATH="$PATH:/usr/local/elixir/bin"
# https://github.com/elixir-lang/elixir/releases
ARG ELIXIR_VERSION=v1.13.4
ARG ELIXIR_CHECKSUM=e64c714e80cd9657b8897d725f6d78f251d443082f6af5070caec863c18068c97af6bdda156c3b3390e0a2b84f77c2ad3378a42913f64bb583fb5251fa49e619
ARG ERLANG_VERSION=1:24.2.1-1
ARG ELIXIR_VERSION=v1.14.1
ARG ELIXIR_CHECKSUM=610b23ab7f8ffd247a62b187c148cd2aa599b5a595137fe0531664903b921306
ARG ERLANG_MAJOR_VERSION=24
ARG ERLANG_VERSION=1:${ERLANG_MAJOR_VERSION}.2.1-1
RUN curl -sSLfO https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb \
&& dpkg -i erlang-solutions_2.0_all.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends esl-erlang=${ERLANG_VERSION} \
&& curl -sSLfO https://github.com/elixir-lang/elixir/releases/download/${ELIXIR_VERSION}/Precompiled.zip \
&& echo "$ELIXIR_CHECKSUM Precompiled.zip" | sha512sum -c - \
&& unzip -d /usr/local/elixir -x Precompiled.zip \
&& rm -f Precompiled.zip erlang-solutions_2.0_all.deb \
&& curl -sSLfO https://github.com/elixir-lang/elixir/releases/download/${ELIXIR_VERSION}/elixir-otp-${ERLANG_MAJOR_VERSION}.zip \
&& echo "$ELIXIR_CHECKSUM elixir-otp-${ERLANG_MAJOR_VERSION}.zip" | sha256sum -c - \
&& unzip -d /usr/local/elixir -x elixir-otp-${ERLANG_MAJOR_VERSION}.zip \
&& rm -f elixir-otp-${ERLANG_MAJOR_VERSION}.zip erlang-solutions_2.0_all.deb \
&& mix local.hex --force \
&& rm -rf /var/lib/apt/lists/*

Expand Down

0 comments on commit 45f52b3

Please sign in to comment.