Skip to content

Commit

Permalink
builder and runner
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegillet committed Jan 10, 2025
1 parent 371a7fb commit eefaa93
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
FROM hexpm/elixir:1.18.1-erlang-27.2-debian-bookworm-20241223

# Install SSL ca certificates
RUN apt-get update && \
apt-get install bash jo jq -y
FROM hexpm/elixir:1.18.1-erlang-27.2-debian-bookworm-20241223 as builder

# Create appuser
RUN useradd -ms /bin/bash appuser
Expand All @@ -23,8 +19,13 @@ RUN mix local.rebar --force && \
RUN MIX_ENV=prod mix escript.build && \
mv exercism_test_helper /opt/test-runner/bin

# clear temp files created by root to avoid permission issues
RUN rm -rf /tmp/*
FROM hexpm/elixir:1.18.1-erlang-27.2-debian-bookworm-20241223 as runner
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /opt/test-runner /opt/test-runner

# Install SSL ca certificates
RUN apt-get update && \
apt-get install bash jo jq -y

USER appuser

Expand Down

0 comments on commit eefaa93

Please sign in to comment.