Skip to content

Commit

Permalink
Fix Dockerfile build issue (#8)
Browse files Browse the repository at this point in the history
I've found that the Dockerfile does not build on my machine, nor does it build on the build server: https://github.com/exercism/erlang-test-runner/actions/runs/813744510

Converting the aliases to lowercase fixes this
  • Loading branch information
ErikSchierboom authored May 6, 2021
1 parent 2fdfbfc commit dba9c5b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
FROM hexpm/erlang:22.3.4.12-ubuntu-focal-20200703 as ERLANG
FROM hexpm/erlang:22.3.4.12-ubuntu-focal-20200703 as erlang

WORKDIR /app

FROM ERLANG as DOWNLOADER
FROM erlang as downloader

RUN apt update; apt install --yes curl; \
mkdir -p /tmp/tools; \
curl -L https://github.com/erlang/rebar3/releases/download/3.14.4/rebar3 > /tmp/tools/rebar3; \
chmod +x /tmp/tools/*

FROM ERLANG as BUILDER
FROM erlang as builder

COPY --from=DOWNLOADER /tmp/tools/rebar3 rebar3
COPY --from=downloader /tmp/tools/rebar3 rebar3
COPY rebar.config rebar.lock ./
RUN ./rebar3 get-deps

COPY src/ src/
RUN ./rebar3 escriptize; find . -type f -executable

FROM ERLANG as RUNNER
FROM erlang as runner

copy --from=BUILDER /app/_build/default/lib/erl_exercism /opt/erl_exercism
COPY --from=BUILDER /app/_build/default/bin/erlang_test_runner /opt/test-runner/bin/
COPY --from=builder /app/_build/default/lib/erl_exercism /opt/erl_exercism
COPY --from=builder /app/_build/default/bin/erlang_test_runner /opt/test-runner/bin/
COPY run.sh /opt/test-runner/bin/run.sh

ENV ERL_LIBS=/opt/erl_exercism
Expand Down

0 comments on commit dba9c5b

Please sign in to comment.