Commit 7b450cd7 authored by Derek's avatar Derek

erlang 19 support, -x32 and 18.2.3 release

closes #8
parent a44b506d
......@@ -2,6 +2,8 @@ language: bash
services: docker
env:
- VERSION=19 VARIANT=
- VERSION=19 VARIANT=slim
- VERSION=18 VARIANT=
- VERSION=18 VARIANT=slim
- VERSION=18 VARIANT=onbuild
......
......@@ -20,7 +20,6 @@ RUN set -xe \
&& 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"]
......@@ -5,30 +5,29 @@ ENV OTP_VERSION=17.5.6.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 set -xe \
&& OTP_DOWNLOAD_SHA1=6ac61061519572aeec01e307dc7960e0fe5e7daf \
&& OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-$OTP_VERSION.tar.gz" \
&& OTP_DOWNLOAD_SHA1="6ac61061519572aeec01e307dc7960e0fe5e7daf" \
&& runtimeDeps=' \
libodbc1 \
libssl1.0.0 \
' \
&& buildDeps=' \
autoconf \
bison \
ca-certificates \
curl \
ca-certificates \
autoconf \
gcc \
g++ \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
make \
libncurses-dev \
libreadline-dev \
libssl-dev \
libxml2-dev \
libxslt-dev \
unixodbc-dev \
make \
libssl-dev \
' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $runtimeDeps \
&& 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" \
&& curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \
&& 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 \
......
FROM buildpack-deps:jessie
ENV OTP_VERSION=18.2.2
ENV OTP_VERSION=18.2.3
# We'll install the build dependencies for erlang-odbc along with the erlang
# build process:
RUN set -xe \
&& OTP_DOWNLOAD_SHA1=e22e1d6f1ee5c0664564a8986e623c1e404330b4 \
&& OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-$OTP_VERSION.tar.gz" \
&& OTP_DOWNLOAD_SHA1="3c530cc8b72a0a5760ab61cd001041eea3de589b" \
&& buildDeps='unixodbc-dev' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& mkdir -p /usr/src/otp-src \
&& curl -fSL -o otp-src.tar.gz "https://github.com/erlang/otp/archive/OTP-$OTP_VERSION.tar.gz" \
&& curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \
&& echo "$OTP_DOWNLOAD_SHA1 otp-src.tar.gz" | sha1sum -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 \
......@@ -20,7 +21,6 @@ RUN set -xe \
&& 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"]
......@@ -29,9 +29,10 @@ CMD ["erl"]
ENV REBAR_VERSION=2.6.1
RUN set -xe \
&& REBAR_DOWNLOAD_SHA1=7f9b799c5dfa06d1779d828c767be2732dacc411 \
&& REBAR_DOWNLOAD_URL="https://github.com/rebar/rebar/archive/${REBAR_VERSION##*@}.tar.gz" \
&& REBAR_DOWNLOAD_SHA1="7f9b799c5dfa06d1779d828c767be2732dacc411" \
&& mkdir -p /usr/src/rebar-src \
&& curl -fSL -o rebar-src.tar.gz "https://github.com/rebar/rebar/archive/$REBAR_VERSION.tar.gz" \
&& curl -fSL -o rebar-src.tar.gz "$REBAR_DOWNLOAD_URL" \
&& echo "$REBAR_DOWNLOAD_SHA1 rebar-src.tar.gz" | sha1sum -c - \
&& tar -xzf rebar-src.tar.gz -C /usr/src/rebar-src --strip-components=1 \
&& rm rebar-src.tar.gz \
......@@ -40,10 +41,16 @@ RUN set -xe \
&& install -v ./rebar /usr/local/bin/ \
&& rm -rf /usr/src/rebar-src
ENV REBAR3_VERSION=3.0.0-beta.4
ENV REBAR3_VERSION="3.0.0@beta-4"
RUN set -xe \
&& git clone --depth 50 --branch $REBAR3_VERSION --single-branch git://github.com/rebar/rebar3.git /usr/src/rebar3-src \
&& REBAR3_DOWNLOAD_URL="https://github.com/rebar/rebar3/archive/${REBAR3_VERSION##*@}.tar.gz" \
&& REBAR3_DOWNLOAD_SHA1="a7c7776d511631f61d1e6ec565baf10b96b32449" \
&& mkdir -p /usr/src/rebar3-src \
&& curl -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" \
&& echo "$REBAR3_DOWNLOAD_SHA1 rebar3-src.tar.gz" | sha1sum -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/ \
......
FROM debian:jessie
ENV OTP_VERSION=18.2.2
ENV OTP_VERSION=18.2.3
# 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 set -xe \
&& OTP_DOWNLOAD_SHA1=e22e1d6f1ee5c0664564a8986e623c1e404330b4 \
&& OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-$OTP_VERSION.tar.gz" \
&& OTP_DOWNLOAD_SHA1="3c530cc8b72a0a5760ab61cd001041eea3de589b" \
&& runtimeDeps=' \
libodbc1 \
libssl1.0.0 \
' \
&& buildDeps=' \
autoconf \
bison \
ca-certificates \
curl \
ca-certificates \
autoconf \
gcc \
g++ \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
make \
libncurses-dev \
libodbc1 \
libreadline-dev \
libssl-dev \
libxml2-dev \
libxslt-dev \
unixodbc-dev \
make \
libssl-dev \
' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $runtimeDeps \
&& apt-get install -y --no-install-recommends $buildDeps \
&& mkdir -p /usr/src/otp-src \
&& curl -fSL -o otp-src.tar.gz "https://github.com/erlang/otp/archive/OTP-$OTP_VERSION.tar.gz" \
&& curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \
&& 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 \
......
#FROM buildpack-deps:x32
#FROM gentoo-x32
FROM buildpack-deps-x32:jessie
ENV OTP_VERSION=18.2.3
# 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_SHA1="3c530cc8b72a0a5760ab61cd001041eea3de589b" \
&& OTP_X32_PATCH="https://github.com/erlang/otp/commit/f7987aa9b.patch" \
&& buildDeps='unixodbc-dev' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \
&& echo "$OTP_DOWNLOAD_SHA1 otp-src.tar.gz" | sha1sum -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 \
&& curl -fSL $OTP_X32_PATCH | patch -p1 \
&& ./otp_build autoconf \
&& ./configure \
&& make -j$(nproc) \
&& make install \
&& find /usr/local -name examples |xargs rm -rf \
&& rm -rf /usr/src/otp-src /var/lib/apt/lists/*
CMD ["erl"]
FROM buildpack-deps:jessie
ENV OTP_VERSION="19.0-rc0@e038cbe"
# We'll install the build dependencies for erlang-odbc along with the erlang
# build process:
RUN set -xe \
&& OTP_DOWNLOAD_SHA1=a29ac533c61da305eb8f3e96118b40e20a524cd7 \
&& buildDeps='unixodbc-dev' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& mkdir -p /usr/src/otp-src \
&& curl -fSL -o otp-src.tar.gz "https://github.com/erlang/otp/archive/${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 \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf /usr/src/otp-src /var/lib/apt/lists/*
CMD ["erl"]
# extra useful tools here
ENV REBAR_VERSION=2.6.1
RUN set -xe \
&& REBAR_DOWNLOAD_SHA1=7f9b799c5dfa06d1779d828c767be2732dacc411 \
&& mkdir -p /usr/src/rebar-src \
&& curl -fSL -o rebar-src.tar.gz "https://github.com/rebar/rebar/archive/$REBAR_VERSION.tar.gz" \
&& echo "$REBAR_DOWNLOAD_SHA1 rebar-src.tar.gz" | sha1sum -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
# Rebar3 compile failed with Erlang-19; comment out so far
# ENV REBAR3_VERSION=3.0.0-beta.4
# RUN set -xe \
# && git clone --depth 50 --branch $REBAR3_VERSION --single-branch git://github.com/rebar/rebar3.git /usr/src/rebar3-src \
# && cd /usr/src/rebar3-src \
# && HOME=$PWD ./bootstrap \
# && install -v ./rebar3 /usr/local/bin/ \
# && rm -rf /usr/src/rebar3-src
FROM erlang:19.0-rc0
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
ONBUILD COPY rebar.config /usr/src/app/
ONBUILD RUN rebar3 update
ONBUILD COPY . /usr/src/app
ONBUILD RUN rebar3 release
CMD [ "rebar3", "shell" ]
FROM debian:jessie
ENV OTP_VERSION="19.0-rc0@e038cbe"
# 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 set -xe \
&& OTP_DOWNLOAD_SHA1=a29ac533c61da305eb8f3e96118b40e20a524cd7 \
&& 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 \
' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& mkdir -p /usr/src/otp-src \
&& curl -fSL -o otp-src.tar.gz "https://github.com/erlang/otp/archive/${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 \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf /usr/src/otp-src /var/lib/apt/lists/*
CMD ["erl"]
#FROM buildpack-deps:x32
#FROM gentoo-x32
FROM buildpack-deps-x32:jessie
ENV OTP_VERSION="19.0-rc0@e038cbe"
RUN set -xe \
&& OTP_DOWNLOAD_SHA1=a29ac533c61da305eb8f3e96118b40e20a524cd7 \
&& OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/${OTP_VERSION##*@}.tar.gz" \
&& curl -fSL -o otp-src.tar.gz $OTP_DOWNLOAD_URL \
&& echo "$OTP_DOWNLOAD_SHA1 otp-src.tar.gz" | sha1sum -c - \
&& mkdir -p /usr/src/otp-src \
&& tar -xzC /usr/src/otp-src --strip-components=1 -f otp-src.tar.gz \
&& rm otp-src.tar.gz \
&& cd /usr/src/otp-src \
&& curl -fSL https://github.com/erlang/otp/commit/f7987aa9b.patch | patch -p1 \
&& ./otp_build autoconf \
&& ./configure \
&& make -j$(nproc) \
&& make install \
&& find /usr/local -name examples |xargs rm -rf \
&& rm -rf /usr/src/otp-src
CMD ["erl"]
......@@ -3,7 +3,7 @@
[![Build Status](https://travis-ci.org/c0b/docker-erlang-otp.svg?branch=master)](https://travis-ci.org/c0b/docker-erlang-otp)
This is used as docker base image for Erlang OTP.
The goal is to provide images for a few last erlang releases (currently 18 / 17), in close to full feature Erlang OTP, and relatively slim images. Support to R16 and R15 are provided in this repo on a best-effort basis, and not part of official-image effort in docker-library/official-images#1075 .
The goal is to provide images for a few last erlang releases (currently 19 / 18 / 17), in close to full feature Erlang OTP, and relatively slim images. Support to R16 and R15 are provided in this repo on a best-effort basis, and not part of official-image effort in docker-library/official-images#1075 .
### Design
......@@ -11,16 +11,26 @@ The goal is to provide images for a few last erlang releases (currently 18 / 17)
based on [buildpack-deps:jessie](https://hub.docker.com/_/buildpack-deps/);
it covered gcc compiler and some popular -dev packages, for those erlang port drivers written in C; while it doesn't have java compiler so jinterface doesn't compile, wxwidgets depends on some gl/gtk headers/lib also doesn't compile; I assume to run GUI applications in docker is not popular, so here we can save some space; jinterface is similar, the java dependencies are too fat, I assume demand to write java code for erlang applications is low;
2. the -onbuild variant for each erlang version, to utilize ONBUILD instruction from Dockerfile, those are for starters
3. rebar tool is bundled in `erlang:18` image.
3. the slim version is built from `debian:jessie` install building tools (compilers & -dev packages) on the fly and uninstall after compilation finished, to shrink image size;
4. rebar and rebar3 tool is bundled in `erlang:18` image, for `-onbuild` images to do something interesting;
5. the `erlang:19` images are built from current master branch of erlang/otp, there is no tag yet, so build it from tags like erlang/otp@e038cbe ; will be ready to build official 19 images when 19 is released in March.
### Sizes
```console
$ docker images |grep ^erlang
REPOSITORY TAG IMAGE ID CREATED SIZE
erlang 19.0-x32 a7bff53623ba 2 minutes ago 699.4 MB
erlang 19.0-rc0 448ce5129d08 7 minutes ago 742.5 MB
erlang 18.2 907bbcb7b07f 43 minutes ago 744.8 MB
erlang 18.2-slim f4f63e4ef62d 27 hours ago 283.9 MB
erlang latest d16b080a468f 27 hours ago 744.8 MB
erlang 17.5-slim 16948ef75f5f 43 hours ago 280.7 MB
erlang 17.5 d16f45f04f42 43 hours ago 740.2 MB
erlang 18.2-slim 8db47440816d 43 hours ago 283.9 MB
erlang 18.2-x32 fe555fc315ae 2 days ago 700.3 MB
erlang 18.1-slim 0d2ef515fa92 21 minutes ago 283.6 MB
erlang 18.1 57cd51bedc4b 35 minutes ago 742.9 MB
erlang 17.5 7a34c8030ca7 2 hours ago 739.8 MB
erlang 17.5-slim e4003d4f37e6 2 hours ago 280.7 MB
```
### Running
......
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