Skip to content

Brev: Use COPY --chmod to reduce Docker image layer count.#157

Open
brycelelbach wants to merge 1 commit intomainfrom
fix/dockerfile-copy-chmod-layers
Open

Brev: Use COPY --chmod to reduce Docker image layer count.#157
brycelelbach wants to merge 1 commit intomainfrom
fix/dockerfile-copy-chmod-layers

Conversation

@brycelelbach
Copy link
Collaborator

@brycelelbach brycelelbach commented Mar 11, 2026

Replace separate COPY + RUN chmod -R a+rwX steps with a single COPY --chmod=0777 in all tutorial dockerfiles and the stdpar docker-recipe, eliminating a redundant layer that duplicated the entire repo's file data.

$ brev/test-docker-image-sizes.bash compare --owner nvidia --tutorial accelerated-python --tag pull-request-157-latest --baseline main-latest
========================================
Image: ghcr.io/nvidia/accelerated-python-tutorial
========================================
  Current    (pull-request-157-latest)                11.83 GB
  Baseline   (main-latest)                            12.66 GB
  ────────────────────────────────────────────────────
  Change:  -850.48 MB (-6.56%)

@brycelelbach brycelelbach force-pushed the fix/dockerfile-copy-chmod-layers branch from 9662677 to 6d7f3f2 Compare March 11, 2026 16:31
@brycelelbach brycelelbach changed the title Use COPY --chmod to reduce Docker image layer count. Brev: Use COPY --chmod to reduce Docker image layer count. Mar 11, 2026
@brycelelbach brycelelbach enabled auto-merge (rebase) March 11, 2026 18:56
@brycelelbach brycelelbach force-pushed the fix/dockerfile-copy-chmod-layers branch from 6d7f3f2 to ca8793f Compare March 11, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants