Modernise Dockerfile (kind-of)
This commit is contained in:
parent
00a9e9f7d7
commit
385a6c7e6c
1 changed files with 8 additions and 4 deletions
12
Dockerfile
12
Dockerfile
|
@ -23,13 +23,17 @@ WORKDIR ${BUILD_DIR}
|
||||||
RUN mix local.hex --force \
|
RUN mix local.hex --force \
|
||||||
&& mix local.rebar --force
|
&& mix local.rebar --force
|
||||||
|
|
||||||
COPY ./mix.exs ./mix.lock ./
|
RUN \
|
||||||
|
--mount=type=cache,target=./deps/,sharing=locked \
|
||||||
RUN mix deps.get --only ${MIX_ENV}
|
--mount=type=bind,source=./mix.exs,target=./mix.exs,readonly \
|
||||||
|
--mount=type=bind,source=./mix.lock,target=./mix.lock,readonly \
|
||||||
|
mix deps.get --only ${MIX_ENV}
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN mkdir -p "${BUILD_DIR}_build/" \
|
RUN \
|
||||||
|
--mount=type=cache,target=./deps/,sharing=locked \
|
||||||
|
mkdir -p "${BUILD_DIR}_build/" \
|
||||||
&& mix release --path "${BUILD_DIR}_build"
|
&& mix release --path "${BUILD_DIR}_build"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue