-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
52 lines (40 loc) · 1.92 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
FROM ubuntu:latest
# Elixir requires UTF-8
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# update and install some software requirements
RUN apt-get update && apt-get upgrade -y && apt-get install -y curl wget git-core build-essential postgresql-client
# For some reason, installing Elixir tries to remove this file
# and if it doesn't exist, Elixir won't install. So, we create it.
# Thanks Daniel Berkompas for this tip.
# http://blog.danielberkompas.com
RUN touch /etc/init.d/couchdb
# Download and install Erlang and Elixir packages
RUN wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
&& dpkg -i erlang-solutions_1.0_all.deb \
&& apt-get update \
&& apt-get install esl-erlang \
&& apt-get install elixir=1.3.3 \
&& rm erlang-solutions_1.0_all.deb
ENV PHOENIX_VERSION 1.2.0
# install the Phoenix Mix archive
RUN mix archive.install --force https://github.com/phoenixframework/archives/raw/master/phoenix_new-$PHOENIX_VERSION.ez
# install Node.js (>= 6.0.0) and NPM in order to satisfy brunch.io dependencies
# See http://www.phoenixframework.org/docs/installation#section-node-js-6-0-0-
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - && apt-get install -y nodejs
# install zsh
RUN apt-get install -y zsh
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true
# Add the wait-for-it.sh script for waiting on dependent containers
RUN curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /usr/local/bin/wait-for-it.sh \
&& chmod +x /usr/local/bin/wait-for-it.sh
# Given our app uses Arc, we need to install imagemagick for image processing
# https://github.com/stavro/arc
RUN apt-get -y install imagemagick --fix-missing
# Install phantomjs for acceptance tests
RUN npm install -g phantomjs-prebuilt
# Install Hex and Rebar
RUN mix local.hex --force
RUN mix local.rebar --force