-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (26 loc) · 688 Bytes
/
Dockerfile
File metadata and controls
39 lines (26 loc) · 688 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
39
#########################
###### Build Image ######
#########################
FROM bitwalker/alpine-elixir:1.9.4 as builder
ENV MIX_ENV=prod \
MIX_HOME=/opt/mix \
HEX_HOME=/opt/hex
RUN mix local.hex --force && \
mix local.rebar --force
WORKDIR /app
COPY mix.lock mix.exs ./
COPY config config
RUN mix deps.get --only-prod && mix deps.compile
COPY priv priv
COPY lib lib
RUN mix release
#########################
##### Release Image #####
#########################
FROM alpine:3.10
RUN apk add --update openssl ncurses
WORKDIR /app
COPY --from=builder /app/_build/prod/rel/hello_operator ./
RUN chown -R nobody: /app
ENTRYPOINT ["/app/bin/hello_operator"]
CMD ["start"]