From 1af4421b9a31b750eac5eb554f52e4c8906aff24 Mon Sep 17 00:00:00 2001 From: Brendon Smith Date: Thu, 7 Jul 2022 17:08:11 -0400 Subject: [PATCH] Use `COPY --link` to improve layer caching This commit will add `--link` to `COPY` commands in the Dockerfile. This allows re-use of these layers, even when layers built previously change. https://github.com/moby/buildkit/blob/HEAD/frontend/dockerfile/docs/syntax.md --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2cfe842..b53ad6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.title="inboard" LABEL org.opencontainers.image.url="https://github.com/br3ndonland/inboard/pkgs/container/inboard" ARG LINUX_VERSION PIPX_VERSION=1.1.0 POETRY_VERSION=1.1.11 ENV APP_MODULE=inboard.app.main_base:app LINUX_VERSION=$LINUX_VERSION PATH=/opt/pipx/bin:/app/.venv/bin:$PATH PIPX_BIN_DIR=/opt/pipx/bin PIPX_HOME=/opt/pipx/home PIPX_VERSION=$PIPX_VERSION POETRY_VERSION=$POETRY_VERSION PYTHONPATH=/app -COPY poetry.lock poetry.toml pyproject.toml /app/ +COPY --link poetry.lock poetry.toml pyproject.toml /app/ WORKDIR /app RUN <