Skip to content

Commit

Permalink
Use COPY --link to improve layer caching
Browse files Browse the repository at this point in the history
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
  • Loading branch information
br3ndonland committed Jul 7, 2022
1 parent d3c6f11 commit 1af4421
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<HEREDOC
. /etc/os-release
Expand All @@ -25,7 +25,7 @@ python -m pip install --no-cache-dir --upgrade pip "pipx==$PIPX_VERSION"
pipx install "poetry==$POETRY_VERSION"
poetry install --no-dev --no-interaction --no-root
HEREDOC
COPY inboard /app/inboard
COPY --link inboard /app/inboard
ENTRYPOINT ["python"]
CMD ["-m", "inboard.start"]

Expand Down

0 comments on commit 1af4421

Please sign in to comment.