-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (33 loc) · 1.12 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
# Base image
#
# VERSION 0.2
FROM debian:latest
MAINTAINER LFE Maintainers <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
build-essential \
ca-certificates \
libcurl4-openssl-dev \
curl \
wget \
git
ENV ERLANG_DEB1 erlang-solutions_1.0_all.deb
ENV ERLANG_DEB2 esl-erlang_18.0-1~debian~jessie_amd64.deb
ENV ERLANG_HOST http://packages.erlang-solutions.com
ENV ERLANG_PATH site/esl/esl-erlang/FLAVOUR_3_general
RUN curl -L -O $ERLANG_HOST/$ERLANG_DEB1
RUN dpkg -i $ERLANG_DEB1 && rm $ERLANG_DEB1
RUN apt-get update
RUN curl -L -O $ERLANG_HOST/$ERLANG_PATH/$ERLANG_DEB2
RUN dpkg -i --force-depends $ERLANG_DEB2 && rm $ERLANG_DEB2
ENV REBAR_REPO https://github.com/rebar/rebar.git
RUN git clone $REBAR_REPO && cd rebar && \
git checkout tags/2.6.0 && \
./bootstrap && \
cp rebar /usr/local/bin
ADD . /opt/erlang/lfe
RUN cd /opt/erlang/lfe && make install
ENV ERL_LIBS=$ERL_LIBS:/opt/erlang/lfe
ENV DEBIAN_FRONTEND ""
CMD /usr/bin/lfe -eval "(io:format \"~p~n\" (list (* 2 (lists:foldl #'+/2 0 (lists:seq 1 6)))))"