-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (28 loc) · 1.05 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
FROM ubuntu:14.04
MAINTAINER Egor Lynko <[email protected]>
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
RUN apt-get update && \
apt-get install -y wget git
RUN wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \
dpkg -i erlang-solutions_1.0_all.deb
RUN wget http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc && \
apt-key add erlang_solutions.asc
RUN apt-get update && \
apt-get install -y esl-erlang=1:19.2 elixir=1.4.1-1
RUN wget https://github.com/jwilder/dockerize/releases/download/v0.2.0/dockerize-linux-amd64-v0.2.0.tar.gz
RUN tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.2.0.tar.gz
RUN mix local.hex --force && \
mix local.rebar --force
ENV APP_HOME /app
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
COPY mix.* ./
RUN mix deps.get --force
RUN MIX_ENV=prod mix compile
COPY . $APP_HOME/
RUN mv config/docker_secrets.exs config/secrets.exs
RUN MIX_ENV=prod mix do compile, release
CMD trap exit TERM; _build/prod/rel/pivotal_bot/bin/pivotal_bot foreground & wait