@@ -11,47 +11,25 @@ ENV LC_ALL en_US.UTF-8
11
11
# update and install some software requirements
12
12
RUN apt-get update && apt-get upgrade -y && apt-get install -y curl wget git make
13
13
14
+ # For some reason, installing Elixir tries to remove this file
15
+ # and if it doesn't exist, Elixir won't install. So, we create it.
16
+ RUN touch /etc/init.d/couchdb
17
+
14
18
# download and install Erlang package
15
19
RUN wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
16
20
&& dpkg -i erlang-solutions_1.0_all.deb \
17
21
&& apt-get update
18
22
19
- # install erlang from package
20
- RUN apt-get install -y erlang erlang-ssl erlang-inets && rm erlang-solutions_1.0_all.deb
21
-
22
- ENV ELIXIR_VERSION 1.2.3
23
- # install elixir from source
24
- RUN git clone https://github.com/elixir-lang/elixir.git && cd elixir && git checkout v$ELIXIR_VERSION && make
25
- ENV PATH $PATH:/elixir/bin
23
+ # install latest elixir package
24
+ RUN apt-get install -y elixir && rm erlang-solutions_1.0_all.deb
26
25
27
26
ENV PHOENIX_VERSION 1.1.4
28
27
29
- # install Phoenix from source with some previous requirements
30
- RUN git clone https://github.com/phoenixframework/phoenix.git \
31
- && cd phoenix && git checkout v$PHOENIX_VERSION \
32
- && mix local.hex --force && mix local.rebar --force \
33
- && mix do deps.get, compile \
34
- && mix archive.install https://github.com/phoenixframework/phoenix/releases/download/v$PHOENIX_VERSION/phoenix_new-$PHOENIX_VERSION.ez --force
35
-
36
- # install Node.js and NPM in order to satisfy brunch.io dependencies
37
- # the snippet below is borrowed from the official nodejs Dockerfile
38
- # https://registry.hub.docker.com/_/node/
39
-
40
- # verify gpg and sha256: http://nodejs.org/dist/v0.12.5/SHASUMS256.txt.asc
41
- # gpg: aka "Timothy J Fontaine (Work) <[email protected] >"
42
- # gpg: aka "Julien Gilli <[email protected] >"
43
- RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 7937DFD2AB06298B2293C3187D33FF9D0246406D 114F43EE0176B71C7BC219DD50A3051F888C628D
44
-
45
- ENV NODE_VERSION 0.12.7
46
- ENV NPM_VERSION 2.12.0
47
-
48
- RUN curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \
49
- && curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
50
- && gpg --verify SHASUMS256.txt.asc \
51
- && grep " node-v$NODE_VERSION-linux-x64.tar.gz\$ " SHASUMS256.txt.asc | sha256sum -c - \
52
- && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \
53
- && rm "node-v$NODE_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc \
54
- && npm install -g npm@"$NPM_VERSION" \
55
- && npm cache clear
28
+ # install the Phoenix Mix archive
29
+ RUN mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new-$PHOENIX_VERSION.ez
30
+
31
+ # install Node.js (>= 5.0.0) and NPM in order to satisfy brunch.io dependencies
32
+ # See http://www.phoenixframework.org/docs/installation#section-node-js-5-0-0-
33
+ RUN curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - && apt-get install -y nodejs
56
34
57
35
WORKDIR /code
0 commit comments