-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
85 lines (76 loc) · 1.84 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
FROM bitnami/minideb:stretch
MAINTAINER Eric Avdey <eiri@eiri.ca>
ARG erl_version=20.1
ENV TERM=xterm \
CFLAGS="-s -O3 -m64" \
KERL_CONFIGURE_OPTIONS="--enable-hipe \
--enable-builtin-zlib \
--enable-dynamic-ssl-lib \
--enable-threads \
--without-asn1 \
--without-compiler \
--without-common_test \
--without-cosEvent \
--without-cosEventDomain \
--without-cosFileTransfer \
--without-cosNotification \
--without-cosProperty \
--without-cosTime \
--without-cosTransactions \
--without-debugger \
--without-dialyzer \
--without-diameter \
--without-edoc \
--without-eldap \
--without-erl_docgen \
--without-et \
--without-eunit \
--without-ic \
--without-inets \
--without-megaco \
--without-mnesia \
--without-observer \
--without-orber \
--without-os_mon \
--without-otp_mibs \
--without-parsetools \
--without-reltool \
--without-runtime_tools \
--without-snmp \
--without-ssh \
--without-syntax_tools \
--without-termcap \
--without-tools \
--without-wx \
--without-xmerl"
RUN install_packages \
curl \
git \
make \
g++ \
libssl-dev \
openssl \
ca-certificates && \
mkdir -p /opt/erlang/ && \
curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl && \
chmod a+x kerl && \
mv kerl /usr/local/bin/kerl && \
kerl update releases && \
kerl build ${erl_version} ${erl_version} && \
kerl install ${erl_version} /opt/erlang/${erl_version} && \
kerl delete build ${erl_version} && \
rm -rf ~/.kerl/archives/* && \
apt-get purge -y --auto-remove \
curl \
git \
make \
g++ \
libssl-dev && \
apt-get clean autoclean && \
apt-get autoremove -y && \
useradd -ms /bin/bash erlanger
USER erlanger
ENV HOME=/home/erlanger
WORKDIR $HOME
RUN echo "source /opt/erlang/${erl_version}/activate" >> ~/.bashrc
CMD ["/bin/bash"]