-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDockerfile
38 lines (25 loc) · 922 Bytes
/
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
ARG erlang_version=24.0.2
ARG elixir_version=1.12.1
ARG alpine_version=3.13.3
FROM hexpm/elixir:${elixir_version}-erlang-${erlang_version}-alpine-${alpine_version} AS builder
RUN apk update
RUN apk add build-base git libtool autoconf automake rust cargo
RUN mix local.hex --force && \
mix local.rebar --force && \
mix hex.info
WORKDIR /app
ENV MIX_ENV=prod RUSTLER_NIF_VERSION=2.15
ADD . .
RUN mix deps.get
RUN mix release
# ==============================================
FROM alpine:${alpine_version}
ENV LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8
# iputils is required for ping command
RUN apk update --no-cache && \
apk add --no-cache bash libsodium libssl1.1 ncurses-libs libgcc libstdc++ iputils
WORKDIR /app
RUN addgroup -S cloak && adduser -S cloak -G cloak -h /app
USER cloak
COPY --chown=cloak:cloak --from=builder /app/_build/prod/rel/cloak .
CMD ["./bin/cloak", "start" ]