-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
50 lines (38 loc) · 1.15 KB
/
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
42
43
44
45
46
47
48
49
50
FROM alpine:3.13.1 as base_stage
LABEL maintainer="beardedeagle <[email protected]>"
# Important! Update this no-op ENV variable when this Dockerfile
# is updated with the current date. It will force refresh of all
# of the base images.
ENV REFRESHED_AT=2021-02-02 \
MIX_HOME=/usr/local/lib/elixir/.mix \
TERM=xterm \
LANG=C.UTF-8
RUN set -xe \
&& apk --no-cache update \
&& apk --no-cache upgrade \
&& apk add --no-cache \
bash \
git \
libstdc++ \
openssl \
zlib \
&& rm -rf /root/.cache \
&& rm -rf /var/cache/apk/* \
&& rm -rf /tmp/*
FROM base_stage as deps_stage
RUN set -xe \
&& apk add --no-cache --virtual .build-deps rsync
FROM beardedeagle/alpine-elixir-builder:1.11.3 as elixir_stage
FROM beardedeagle/alpine-node-builder:15.8.0 as node_stage
FROM deps_stage as stage
COPY --from=elixir_stage /usr/local /opt/elixir
COPY --from=node_stage /usr/local /opt/node
RUN set -xe \
&& rsync -a /opt/elixir/ /usr/local \
&& rsync -a /opt/node/ /usr/local \
&& apk del .build-deps \
&& rm -rf /root/.cache \
&& rm -rf /var/cache/apk/* \
&& rm -rf /tmp/*
FROM base_stage
COPY --from=stage /usr/local /usr/local