Commit c85ebec8 authored by Roberto Quintanilla's avatar Roberto Quintanilla Committed by Derek

Refactored project layout & Dockerfiles for standard & slim versions of Erlang 18 & 17

parent 1706e97b
FROM buildpack-deps:jessie
ENV OTP_VERSION 17.5.6.4
ENV OTP_DOWNLOAD_SHA1 8436bbc750dc90580842e907f911255228d2d070
ENV LANG C.UTF-8
RUN set -xe \
&& OTP_DOWNLOAD_URL=https://github.com/erlang/otp/archive/OTP-$OTP_VERSION.tar.gz \
&& OTP_DOWNLOAD_SHA1=8436bbc750dc90580842e907f911255228d2d070 \
&& curl -SL $OTP_DOWNLOAD_URL -o otp-src.tar.gz \
&& echo "$OTP_DOWNLOAD_SHA1 otp-src.tar.gz" | sha1sum -c - \
# We'll install the build dependencies for erlang-odbc along with the erlang
# build process:
RUN buildDeps='unixodbc-dev' \
&& set -xe \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& mkdir -p /usr/src/otp-src \
&& tar -xzC /usr/src/otp-src --strip-components=1 -f otp-src.tar.gz \
&& curl -fSL -o otp-src.tar.gz "https://github.com/erlang/otp/archive/OTP-$OTP_VERSION.tar.gz" \
&& echo "$OTP_DOWNLOAD_SHA1 otp-src.tar.gz" | sha1sum -c - \
&& 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 \
......@@ -18,6 +21,7 @@ RUN set -xe \
&& make -j$(nproc) \
&& make install \
&& find /usr/local -name examples |xargs rm -rf \
&& rm -rf /usr/src/otp-src
&& rm -rf /usr/src/otp-src \
&& apt-get purge -y --auto-remove $buildDeps
CMD ["erl"]
FROM debian:jessie
ENV OTP_VERSION 17.5.6.4
ENV OTP_DOWNLOAD_SHA1 8436bbc750dc90580842e907f911255228d2d070
ENV LANG C.UTF-8
# We'll install the build dependencies, and purge them on the last step to make
# sure our final image contains only what we've just built:
RUN buildDeps=' \
autoconf \
bison \
ca-certificates \
curl \
gcc \
g++ \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
libncurses-dev \
libreadline-dev \
libssl-dev \
libxml2-dev \
libxslt-dev \
unixodbc-dev \
make \
' \
&& set -xe \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/otp-src \
&& curl -fSL -o otp-src.tar.gz "https://github.com/erlang/otp/archive/OTP-$OTP_VERSION.tar.gz" \
&& echo "$OTP_DOWNLOAD_SHA1 otp-src.tar.gz" | sha1sum -c - \
&& 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 \
&& ./configure \
&& make -j$(nproc) \
&& make install \
&& find /usr/local -name examples |xargs rm -rf \
&& rm -rf /usr/src/otp-src \
&& apt-get purge -y --auto-remove $buildDeps
CMD ["erl"]
FROM buildpack-deps:jessie
ENV OTP_VERSION 18.1.3
ENV OTP_DOWNLOAD_SHA1 981e6c03c0a310483e6c14edb7dd2acaa842e2f8
ENV LANG C.UTF-8
RUN set -xe \
&& OTP_DOWNLOAD_URL=https://github.com/erlang/otp/archive/OTP-$OTP_VERSION.tar.gz \
&& OTP_DOWNLOAD_SHA1=981e6c03c0a310483e6c14edb7dd2acaa842e2f8 \
&& curl -SL $OTP_DOWNLOAD_URL -o otp-src.tar.gz \
&& echo "$OTP_DOWNLOAD_SHA1 otp-src.tar.gz" | sha1sum -c - \
# We'll install the build dependencies for erlang-odbc along with the erlang
# build process:
RUN buildDeps='unixodbc-dev' \
&& set -xe \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& mkdir -p /usr/src/otp-src \
&& tar -xzC /usr/src/otp-src --strip-components=1 -f otp-src.tar.gz \
&& curl -fSL -o otp-src.tar.gz "https://github.com/erlang/otp/archive/OTP-$OTP_VERSION.tar.gz" \
&& echo "$OTP_DOWNLOAD_SHA1 otp-src.tar.gz" | sha1sum -c - \
&& 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 \
......@@ -18,6 +21,7 @@ RUN set -xe \
&& make -j$(nproc) \
&& make install \
&& find /usr/local -name examples |xargs rm -rf \
&& rm -rf /usr/src/otp-src
&& rm -rf /usr/src/otp-src \
&& apt-get purge -y --auto-remove $buildDeps
CMD ["erl"]
FROM buildpack-deps:jessie-curl
ENV OTP_VERSION 18.1
ENV LANG C.UTF-8
RUN set -xe \
&& ESL_URL=http://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/ \
&& OTP_FILENAME=esl-erlang_$OTP_VERSION-1~debian~jessie_amd64.deb \
&& OTP_DOWNLOAD_URL=$ESL_URL/$OTP_FILENAME \
&& curl -SL $OTP_DOWNLOAD_URL -O \
&& curl -SL $OTP_DOWNLOAD_URL.md5 | md5sum -c - \
&& dpkg --force-depends -i $OTP_FILENAME \
&& rm $OTP_FILENAME
CMD ["erl"]
FROM debian:jessie
ENV OTP_VERSION 18.1.3
ENV OTP_DOWNLOAD_SHA1 981e6c03c0a310483e6c14edb7dd2acaa842e2f8
ENV LANG C.UTF-8
# We'll install the build dependencies, and purge them on the last step to make
# sure our final image contains only what we've just built:
RUN buildDeps=' \
autoconf \
bison \
ca-certificates \
curl \
gcc \
g++ \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
libncurses-dev \
libodbc1 \
libreadline-dev \
libssl-dev \
libxml2-dev \
libxslt-dev \
unixodbc-dev \
make \
' \
&& set -xe \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/otp-src \
&& curl -fSL -o otp-src.tar.gz "https://github.com/erlang/otp/archive/OTP-$OTP_VERSION.tar.gz" \
&& echo "$OTP_DOWNLOAD_SHA1 otp-src.tar.gz" | sha1sum -c - \
&& 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 \
&& ./configure \
&& make -j$(nproc) \
&& make install \
&& find /usr/local -name examples |xargs rm -rf \
&& rm -rf /usr/src/otp-src \
&& apt-get purge -y --auto-remove $buildDeps
CMD ["erl"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment