forked from bitwalker/alpine-elixir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (29 loc) · 1.06 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
FROM bitwalker/alpine-erlang:22.2.8
MAINTAINER Paul Schoenfelder <[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 and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built.
ENV REFRESHED_AT=2020-03-16 \
ELIXIR_VERSION=v1.10.2 \
MIX_HOME=/opt/mix \
HEX_HOME=/opt/hex
WORKDIR /tmp/elixir-build
RUN \
apk --no-cache --update upgrade && \
apk add --no-cache --update --virtual .elixir-build \
make && \
apk add --no-cache --update \
git && \
git clone https://github.com/elixir-lang/elixir --depth 1 --branch $ELIXIR_VERSION && \
cd elixir && \
make && make install && \
mix local.hex --force && \
mix local.rebar --force && \
cd $HOME && \
rm -rf /tmp/elixir-build && \
apk del --no-cache .elixir-build
WORKDIR ${HOME}
# Always install latest versions of Hex and Rebar
ONBUILD RUN mix do local.hex --force, local.rebar --force
CMD ["/bin/sh"]