forked from lattenwald/highloadcup.ru
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-alpine
38 lines (26 loc) · 949 Bytes
/
Dockerfile-alpine
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 alpine:edge as builder
RUN apk update
RUN apk add -uUv erlang erlang-asn1 erlang-crypto erlang-dialyzer \
erlang-public-key erlang-sasl erlang-ssl erlang-tools erlang-dev \
erlang-inets erlang-syntax-tools erlang-eunit erlang-runtime-tools \
erlang-parsetools bash elixir gcc g++
ADD . /app
WORKDIR /app
ENV MIX_ENV=prod
RUN mix do local.hex --force, local.rebar --force
RUN mix deps.clean --all
RUN mix do deps.get, deps.compile, release.clean, release
FROM alpine:edge
WORKDIR /app
RUN apk add -uUv bash p7zip
EXPOSE 80
COPY --from=builder /app/_build/prod/rel/round1/releases/0.1.0/round1.tar.gz /app
ARG bust
RUN echo $bust && tar -xzf round1.tar.gz && rm round1.tar.gz
CMD echo -n "getting ready " && date && \
mkdir /tmp/123 && \
cd /tmp/123 && \
cp /tmp/data/options.txt /tmp/123 && \
7z e /tmp/data/data.zip && \
echo -n "running app " && date && \
/app/bin/round1 foreground