Commit 037e1cf
committed
docker: bind-mount the wheels instead of COPY + rm
COPY --from=builder /wheels /wheels commits the wheels as their own
layer; the rm -r /wheels in the next RUN writes a whiteout and does not
un-commit them, so they ship in every pull.
Measured on the published image pythonopenapi/openapi-spec-validator:0.8.2: layer ef2bee5a338d is
1,698,738 of 25,227,374 compressed bytes on amd64 (6.73%), and
1,674,155 of 25,602,635 on arm64.
Bind-mounting the builder stage's /wheels for the one RUN that needs it
installs the same wheels without committing them, and makes the rm
unnecessary. Requires BuildKit, which docker-publish.yml already uses.1 parent 2121137 commit 037e1cf
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
0 commit comments