From 420a9992b625bc990f342d4305a2ea52dff27715 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Wed, 18 Oct 2023 11:33:01 +0200 Subject: [PATCH] Fetch cargo deps earlier during container build --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5fe10c40d..ee5974d2c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,9 @@ RUN apk upgrade && \ mix local.rebar --force && \ mix local.hex --force +COPY native native/ +RUN cd native/vt_nif && cargo build -r + COPY mix.* ./ RUN mix do deps.get --only prod, deps.compile @@ -37,7 +40,6 @@ RUN mix phx.digest COPY config/*.exs config/ COPY lib lib/ COPY priv priv/ -COPY native native/ # recompile sentry with our source code RUN mix deps.compile sentry --force