-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (27 loc) · 725 Bytes
/
Copy pathDockerfile
File metadata and controls
38 lines (27 loc) · 725 Bytes
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
FROM bitwalker/alpine-elixir:1.10.2 as releaser
WORKDIR /app
# Install Hex + Rebar
RUN mix do local.hex --force, local.rebar --force
COPY config/ /app/config/
COPY mix.exs /app/
COPY mix.* /app/
ENV MIX_ENV=prod
RUN mix do deps.get --only $MIX_ENV, deps.compile
# build project
COPY . /app/
COPY node_modules /app/
COPY package-lock.json /app/
RUN mix compile
# build release
WORKDIR /app
RUN MIX_ENV=prod mix release
########################################################################
FROM bitwalker/alpine-elixir:1.10.2
EXPOSE 4004
ENV PORT=4004 \
MIX_ENV=prod \
SHELL=/bin/bash
WORKDIR /app
COPY --from=releaser app/_build/prod/rel/sock_app .
COPY --from=releaser app/bin/ ./bin
CMD ["./bin/start"]