-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
53 lines (45 loc) · 1.76 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
FROM alpine:3.6
MAINTAINER Holger Amann <[email protected]>
ARG ERLANG_VERSION=20.1
ARG DISABLED_APPS='megaco wx debugger jinterface orber reltool observer gs et'
ARG ERLANG_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${ERLANG_VERSION}.tar.gz"
RUN set -xe \
&& apk --update add --virtual build-dependencies curl ca-certificates build-base autoconf perl ncurses-dev openssl-dev unixodbc-dev tar ncurses openssl unixodbc \
&& curl -fSL -o otp-src.tar.gz "$ERLANG_DOWNLOAD_URL" \
&& 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 \
&& for lib in ${DISABLED_APPS} ; do touch lib/${lib}/SKIP ; done \
&& ./otp_build autoconf \
&& ./configure \
--enable-smp-support \
--enable-m64-build \
--disable-native-libs \
--enable-sctp \
--enable-threads \
--enable-kernel-poll \
--disable-hipe \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& find /usr/local -name examples | xargs rm -rf \
&& apk del build-dependencies \
&& ls -d /usr/local/lib/erlang/lib/*/src | xargs rm -rf \
&& rm -rf \
/opt \
/var/cache/apk/* \
/tmp/* \
/usr/src
ARG ELIXIR_VERSION=1.5.2
RUN set -xe \
&& apk --update add openssl ca-certificates \
&& wget --no-check-certificate https://github.com/elixir-lang/elixir/releases/download/v${ELIXIR_VERSION}/Precompiled.zip \
&& mkdir -p /opt/elixir-${ELIXIR_VERSION}/ \
&& unzip Precompiled.zip -d /opt/elixir-${ELIXIR_VERSION}/ \
&& rm Precompiled.zip \
&& rm -rf /etc/ssl \
&& rm -rf \
/var/cache/apk/* \
/tmp/*
ENV PATH $PATH:/opt/elixir-${ELIXIR_VERSION}/bin
CMD ["/bin/sh"]