From f03c0bc63fe3d0314f34d572cbfdc20a426069ab Mon Sep 17 00:00:00 2001 From: itepechi <72330683+itepechi@users.noreply.github.com> Date: Fri, 4 Aug 2023 05:24:06 +0900 Subject: [PATCH] Cache downloaded deps --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b71c7d61c..d15770fb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,12 +20,16 @@ RUN addgroup -g ${GID} akkoma \ WORKDIR ${BUILD_DIR} +RUN mix local.hex --force \ + && mix local.rebar --force + +COPY ./mix.exs ./mix.lock ./ + +RUN mix deps.get --only ${MIX_ENV} + COPY . . RUN mkdir -p "${BUILD_DIR}_build/" \ - && mix local.hex --force \ - && mix local.rebar --force \ - && mix deps.get --only prod \ && mix release --path "${BUILD_DIR}_build"