-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.Dockerfile
41 lines (33 loc) · 1.07 KB
/
test.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 erlang:22-alpine
RUN apk add --no-cache \
ca-certificates \
gcc
# elixir expects utf8.
ENV ELIXIR_VERSION="v1.10.4" \
LANG=C.UTF-8
RUN set -xe \
&& ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" \
&& ELIXIR_DOWNLOAD_SHA256="8518c78f43fe36315dbe0d623823c2c1b7a025c114f3f4adbb48e04ef63f1d9f" \
&& buildDeps=' \
ca-certificates \
curl \
make \
' \
&& apk add --no-cache --virtual .build-deps $buildDeps \
&& curl -fSL -o elixir-src.tar.gz $ELIXIR_DOWNLOAD_URL \
&& echo "$ELIXIR_DOWNLOAD_SHA256 elixir-src.tar.gz" | sha256sum -c - \
&& mkdir -p /usr/local/src/elixir \
&& tar -xzC /usr/local/src/elixir --strip-components=1 -f elixir-src.tar.gz \
&& rm elixir-src.tar.gz \
&& cd /usr/local/src/elixir \
&& make install clean \
&& apk del .build-deps
RUN apk update && \
apk --no-cache --update upgrade busybox musl && \
apk --no-cache --update add git make build-base && \
rm -rf /var/cache/apk/*
RUN mix local.hex --force && \
mix local.rebar --force
COPY ./ ./
RUN mix deps.get
RUN MIX_ENV=test mix compile