Skip to content

Commit

Permalink
docs: dockerfile chmod variable interpolation
Browse files Browse the repository at this point in the history
Signed-off-by: David Karlsson <[email protected]>
  • Loading branch information
dvdksn committed Aug 7, 2024
1 parent de65ae6 commit 059ea90
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/dockerfile/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1646,6 +1646,16 @@ If the container root filesystem doesn't contain either `/etc/passwd` or
flag, the build will fail on the `COPY` operation. Using numeric IDs requires
no lookup and does not depend on container root filesystem content.

With BuildKit version 0.16.0 and later, the `--chmod` flag supports variable
interpolation, which lets you define the permission bits using build arguments:

```dockerfile
FROM alpine
WORKDIR /src
ARG MODE=440
COPY --chmod=$MODE . .
```

### COPY --link

```dockerfile
Expand Down

0 comments on commit 059ea90

Please sign in to comment.