From 28241808b14dde6ffcebddcf4c0929b814fa6c0f Mon Sep 17 00:00:00 2001 From: Kieran Eglin Date: Wed, 22 May 2024 11:34:28 -0700 Subject: [PATCH] Added explicit MIX_ENV build arg --- dev.Dockerfile | 5 +++-- docker-compose.ci.yml | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index 66bdfbed..d48d94b7 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -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:?}" @@ -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" diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index d4f4d6fb..5fb6d8c8 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -4,6 +4,8 @@ services: build: context: . dockerfile: dev.Dockerfile + args: + MIX_ENV: test environment: - MIX_ENV=test volumes: