-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
41 lines (29 loc) · 967 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
39
40
41
#FROM elixir:1.10.4-alpine as builder
# FROM hexpm/elixir:1.11.1-erlang-23.0.2-alpine-3.12.0 as builder
FROM hexpm/elixir:1.14.3-erlang-25.2.1-alpine-3.17.0 as builder
ARG MIX_ENV=prod
WORKDIR /src
RUN mix local.hex --force && \
mix local.rebar --force
COPY mix.exs mix.lock ./
COPY apps/hibiki/mix.exs ./apps/hibiki/
COPY apps/hibiki_web/mix.exs ./apps/hibiki_web/
COPY apps/line_sdk/mix.exs ./apps/line_sdk/
COPY apps/teitoku/mix.exs ./apps/teitoku/
RUN mix do deps.get --only ${MIX_ENV}, deps.compile
COPY rel ./rel
COPY apps ./apps
COPY config ./config
ARG TAG
RUN mix do release
# RUN mix do deps.get --only ${MIX_ENV}, release
# ===========================================
FROM alpine:3.17
RUN apk upgrade --no-cache && \
apk add --no-cache openssl ncurses-libs bash file curl libstdc++ libgcc
WORKDIR /app
COPY --from=builder /src/_build/prod/rel/hibiki_elixir/ .
EXPOSE 8080
EXPOSE 9568
ENTRYPOINT ["/app/bin/hibiki_elixir"]
CMD ["start"]