You've already forked docker-erlang-otp
mirror of
https://github.com/erlang/docker-erlang-otp.git
synced 2025-09-16 23:42:02 +03:00
Starting from 3.19.0, Rebar3 only support OTP 23 to 25 inclusively. Hence, the last official supported Rebar3 for OTP 22 is 3.18.0. See: - https://github.com/erlang/rebar3/releases/tag/3.19.0 - https://github.com/erlang/rebar3/pull/2706
68 lines
2.5 KiB
Docker
68 lines
2.5 KiB
Docker
FROM buildpack-deps:buster
|
|
|
|
ENV OTP_VERSION="22.3.4.27" \
|
|
REBAR3_VERSION="3.18.0" \
|
|
REBAR_VERSION="2.6.4"
|
|
|
|
LABEL org.opencontainers.image.version=$OTP_VERSION
|
|
|
|
# We'll install the build dependencies for erlang-odbc along with the erlang
|
|
# build process:
|
|
RUN set -xe \
|
|
&& OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \
|
|
&& OTP_DOWNLOAD_SHA256="0fb5dc388a4d6f1c7c0e250b5a44466727f35794b0566cad4190cd7c68ca5062" \
|
|
&& runtimeDeps='libodbc1 \
|
|
libsctp1 \
|
|
libwxgtk3.0' \
|
|
&& buildDeps='unixodbc-dev \
|
|
libsctp-dev \
|
|
libwxgtk3.0-dev' \
|
|
&& apt-get update \
|
|
&& apt-get install -y --no-install-recommends $runtimeDeps \
|
|
&& apt-get install -y --no-install-recommends $buildDeps \
|
|
&& curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \
|
|
&& echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - \
|
|
&& export ERL_TOP="/usr/src/otp_src_${OTP_VERSION%%@*}" \
|
|
&& mkdir -vp $ERL_TOP \
|
|
&& tar -xzf otp-src.tar.gz -C $ERL_TOP --strip-components=1 \
|
|
&& rm otp-src.tar.gz \
|
|
&& ( cd $ERL_TOP \
|
|
&& ./otp_build autoconf \
|
|
&& gnuArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)" \
|
|
&& ./configure --build="$gnuArch" \
|
|
&& make -j$(nproc) \
|
|
&& make install ) \
|
|
&& find /usr/local -name examples | xargs rm -rf \
|
|
&& apt-get purge -y --auto-remove $buildDeps \
|
|
&& rm -rf $ERL_TOP /var/lib/apt/lists/*
|
|
|
|
CMD ["erl"]
|
|
|
|
# extra useful tools here: rebar & rebar3
|
|
|
|
RUN set -xe \
|
|
&& REBAR_DOWNLOAD_URL="https://github.com/rebar/rebar/archive/${REBAR_VERSION}.tar.gz" \
|
|
&& REBAR_DOWNLOAD_SHA256="577246bafa2eb2b2c3f1d0c157408650446884555bf87901508ce71d5cc0bd07" \
|
|
&& mkdir -p /usr/src/rebar-src \
|
|
&& curl -fSL -o rebar-src.tar.gz "$REBAR_DOWNLOAD_URL" \
|
|
&& echo "$REBAR_DOWNLOAD_SHA256 rebar-src.tar.gz" | sha256sum -c - \
|
|
&& tar -xzf rebar-src.tar.gz -C /usr/src/rebar-src --strip-components=1 \
|
|
&& rm rebar-src.tar.gz \
|
|
&& cd /usr/src/rebar-src \
|
|
&& ./bootstrap \
|
|
&& install -v ./rebar /usr/local/bin/ \
|
|
&& rm -rf /usr/src/rebar-src
|
|
|
|
RUN set -xe \
|
|
&& REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \
|
|
&& REBAR3_DOWNLOAD_SHA256="cce1925d33240d81d0e4d2de2eef3616d4c17b0532ed004274f875e6607d25d2" \
|
|
&& mkdir -p /usr/src/rebar3-src \
|
|
&& curl -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" \
|
|
&& echo "$REBAR3_DOWNLOAD_SHA256 rebar3-src.tar.gz" | sha256sum -c - \
|
|
&& tar -xzf rebar3-src.tar.gz -C /usr/src/rebar3-src --strip-components=1 \
|
|
&& rm rebar3-src.tar.gz \
|
|
&& cd /usr/src/rebar3-src \
|
|
&& HOME=$PWD ./bootstrap \
|
|
&& install -v ./rebar3 /usr/local/bin/ \
|
|
&& rm -rf /usr/src/rebar3-src
|