-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.elixir
73 lines (69 loc) · 1.98 KB
/
Dockerfile.elixir
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
FROM operable/alpine-base:0.3
ENV ERLANG_VERSION 19.1
ENV ELIXIR_VERSION 1.3.4
# Erlang
#
# Modified from
# https://github.com/bitwalker/alpine-erlang
WORKDIR /tmp/erlang-build
RUN \
# Install Erlang/OTP deps
apk -U add \
openssl-dev \
ncurses-dev \
unixodbc-dev \
zlib-dev && \
# Install Erlang/OTP build deps
apk -U add --virtual .erlang-build \
build-base \
perl-dev && \
export ERLANG_SOURCE=otp_src_$ERLANG_VERSION && \
wget http://erlang.org/download/$ERLANG_SOURCE.tar.gz && \
tar -xzf $ERLANG_SOURCE.tar.gz && \
cd $ERLANG_SOURCE && \
export ERL_TOP=/tmp/erlang-build/$ERLANG_SOURCE && \
export PATH=$ERL_TOP/bin:$PATH && \
export CPPFlAGS="-D_BSD_SOURCE $CPPFLAGS" && \
# Configure
./configure --prefix=/usr \
--without-javac \
--without-wx \
--without-debugger \
--without-observer \
--without-jinterface \
--without-common_test \
--without-cosEvent\
--without-cosEventDomain \
--without-cosFileTransfer \
--without-cosNotification \
--without-cosProperty \
--without-cosTime \
--without-cosTransactions \
--without-dialyzer \
--without-et \
--without-gs \
--without-ic \
--without-megaco \
--without-orber \
--without-percept \
--without-typer \
--enable-threads \
--enable-shared-zlib \
--enable-ssl=dynamic-ssl-lib \
--enable-hipe && \
# Build
make -j4 && make install && \
# Cleanup
apk del .erlang-build && \
rm -rf /tmp/erlang-build && \
# Remove Erlang source code
find /usr/lib/erlang/lib/* -type d -name src | xargs -n1 rm -Rf && \
rm -rf /var/cache/apk/*
WORKDIR /
# Elixir
RUN wget https://github.com/elixir-lang/elixir/releases/download/v$ELIXIR_VERSION/Precompiled.zip && \
unzip -d /usr/local Precompiled.zip && \
rm -f /usr/local/bin/*.bat && \
rm -f Precompiled.zip
RUN mix local.hex --force
RUN mix local.rebar --force