You've already forked docker-erlang-otp
mirror of
https://github.com/erlang/docker-erlang-otp.git
synced 2025-09-18 11:14:32 +03:00
From the [CrossBuildPackagingGuidelines wiki page](https://wiki.debian.org/CrossBuildPackagingGuidelines) `DEB_BUILD_GNU_TYPE` is the architecture of the machine *building* the package, whereas `DEB_HOST_GNU_TYPE` is the architecture for which we are building the package. I noticed this issue while cross-compiling an ARM container on my Mac.
31 lines
1.1 KiB
Docker
31 lines
1.1 KiB
Docker
FROM buildpack-deps:jessie
|
|
|
|
ENV OTP_VERSION="17.5.6.9"
|
|
|
|
# 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="70d9d0a08969f4c51c78088f8c6b7da22a4806b1fd258a9fff1408f56553f378" \
|
|
&& runtimeDeps='libodbc1' \
|
|
&& buildDeps='unixodbc-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 - \
|
|
&& mkdir -p /usr/src/otp-src \
|
|
&& tar -xzf otp-src.tar.gz -C /usr/src/otp-src --strip-components=1 \
|
|
&& rm otp-src.tar.gz \
|
|
&& cd /usr/src/otp-src \
|
|
&& ./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 /usr/src/otp-src /var/lib/apt/lists/*
|
|
|
|
CMD ["erl"]
|