Commit 411b2c90 authored by Derek's avatar Derek

update README.md and Dockerfile for R16

parent 70fd1e32
FROM buildpack-deps:jessie
ENV OTP_VERSION R16B03-1
ENV LANG C.UTF-8
ENV OTP_VERSION=R16B03-1 LANG=C.UTF-8
RUN set -xe \
&& OTP_DOWNLOAD_URL=http://www.erlang.org/download/otp_src_$OTP_VERSION.tar.gz \
&& OTP_DOWNLOAD_MD5=e5ece977375197338c1b93b3d88514f8 \
&& curl -SL $OTP_DOWNLOAD_URL -o otp-src.tar.gz \
&& buildDeps='unixodbc-dev' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& curl -fSL -o otp-src.tar.gz http://www.erlang.org/download/otp_src_$OTP_VERSION.tar.gz \
&& echo "$OTP_DOWNLOAD_MD5 otp-src.tar.gz" | md5sum -c - \
&& mkdir -p /usr/src/otp-src \
&& tar -xzC /usr/src/otp-src --strip-components=1 -f otp-src.tar.gz \
......@@ -17,6 +17,7 @@ RUN set -xe \
&& 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 \
&& rm -rf /usr/src/otp-src /var/lib/apt/lists/*
CMD ["erl"]
......@@ -3,24 +3,24 @@
[![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 the last 4, one latest release for each of last four major version: 18, 17, R16, R15.), in close to full feature Erlang OTP, and relatively slim images;
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 .
### Design
1. the standard variant `erlang:18`, `erlang:17`, `erlang:R16`, `erlang:R15` builds from source code,
1. the standard variant `erlang:18`, `erlang:17`, builds from source code,
based on [buildpack-deps:jessie](https://hub.docker.com/_/buildpack-deps/);
it covered gcc compiler and some popular -dev packages, for port driver written in C; while it doesn't have java compiler so the odbc / 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 space; jinterface is similar, the java dependencies are too fat, I assume demand is low;
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. -esl variant is to pull erlang-solutions deb package to install on top of `debian:jessie`, results in relatively slim image, while I am trying to avoid install depended packages by wxwidgets / jinterface, reasons same as above.
3. rebar tool is bundled in `erlang:18` image.
### Sizes
```console
$ docker images |grep ^erlang
erlang 18.1-esl 138c797adec7 5 days ago 286.9 MB
erlang 18.1 27ad0fc44644 5 days ago 741.5 MB
erlang R16B03-1 e0deec5e1e72 6 days ago 740.2 MB
erlang 18.0.3 52d4a7a4a281 6 days ago 743.7 MB
erlang 18.1 05a80e15fadc 2 hours ago 742.9 MB
erlang 18.1-slim fc08749128b9 2 hours ago 283.6 MB
erlang 17.5 7a34c8030ca7 2 hours ago 739.8 MB
erlang 17.5-slim e4003d4f37e6 2 hours ago 280.7 MB
```
### Running
......@@ -40,24 +40,20 @@ ok
User switch command
--> q
$ docker run -it --rm erlang:18.1 /bin/bash
root@6d2c1ad52ae8:/# ls /usr/local/lib/erlang/lib/
asn1-4.0 cosProperty-1.2 edoc-0.7.17 gs-1.6 observer-2.1
public_key-1.0.1 stdlib-2.6 xmerl-1.3.8 common_test-1.11
cosTime-1.2 eldap-1.2 hipe-3.13 orber-3.8 reltool-0.7
syntax_tools-1.7 compiler-6.0.1 cosTransactions-1.3
erl_docgen-0.4 ic-4.4 os_mon-2.4 runtime_tools-1.9.1
test_server-3.9 cosEvent-2.2 crypto-3.6.1 erl_interface-3.8
inets-6.0.1 ose-1.1 sasl-2.6 tools-2.8.1 cosEventDomain-1.2
debugger-4.1.1 erts-7.1 kernel-4.1 otp_mibs-1.1 snmp-5.2
typer-0.9.9 cosFileTransfer-1.2 dialyzer-2.8.1 et-1.5.1
megaco-3.18 parsetools-2.1 ssh-4.1 webtool-0.9 cosNotification-1.2
diameter-1.11 eunit-2.2.11 mnesia-4.13.1 percept-0.8.11
ssl-7.1 wx-1.5
root@4cfd3172e8cc:/# ls /usr/local/lib/erlang/lib/ | wc -l
50
root@88f845c8c7af:/# ls /usr/local/lib/erlang/lib/
asn1-4.0 diameter-1.11 megaco-3.18 sasl-2.6
common_test-1.11 edoc-0.7.17 mnesia-4.13.2 snmp-5.2
compiler-6.0.1 eldap-1.2 observer-2.1 ssh-4.1.2
cosEvent-2.2 erl_docgen-0.4 odbc-2.11.1 ssl-7.1
cosEventDomain-1.2 erl_interface-3.8 orber-3.8 stdlib-2.6
cosFileTransfer-1.2 erts-7.1 os_mon-2.4 syntax_tools-1.7
cosNotification-1.2 et-1.5.1 ose-1.1 test_server-3.9
cosProperty-1.2 eunit-2.2.11 otp_mibs-1.1 tools-2.8.1
cosTime-1.2 gs-1.6 parsetools-2.1 typer-0.9.9
cosTransactions-1.3 hipe-3.13 percept-0.8.11 webtool-0.9
crypto-3.6.1 ic-4.4 public_key-1.0.1 wx-1.5
debugger-4.1.1 inets-6.0.2 reltool-0.7 xmerl-1.3.8
dialyzer-2.8.1 kernel-4.1 runtime_tools-1.9.1
root@88f845c8c7af:/# ls /usr/local/lib/erlang/lib/ |wc -l
51
```
Check [Existing images for Erlang OTP](https://github.com/docker-library/official-images/pull/1075#issuecomment-144287252)
Latest Erlang OTP Releases: http://www.erlang.org/download.html
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