Skip to content

Commit

Permalink
Added explicit MIX_ENV build arg
Browse files Browse the repository at this point in the history
  • Loading branch information
kieraneglin committed May 22, 2024
1 parent e117a3a commit 2824180
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ARG DEV_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEB

FROM ${DEV_IMAGE}

ARG MIX_ENV=dev
ARG TARGETPLATFORM
RUN echo "Building for ${TARGETPLATFORM:?}"

Expand Down Expand Up @@ -58,8 +59,8 @@ RUN chmod +x ./docker-run.dev.sh

# Install Elixir deps
# RUN mix archive.install github hexpm/hex branch latest
RUN mix deps.get
RUN mix deps.compile
RUN MIX_ENV=${MIX_ENV} mix deps.get
RUN MIX_ENV=${MIX_ENV} mix deps.compile
# Gives us iex shell history
ENV ERL_AFLAGS="-kernel shell_history enabled"

Expand Down
2 changes: 2 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ services:
build:
context: .
dockerfile: dev.Dockerfile
args:
MIX_ENV: test
environment:
- MIX_ENV=test
volumes:
Expand Down

0 comments on commit 2824180

Please sign in to comment.