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 e8d7e04
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frontend/dockerfile/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1646,6 +1646,17 @@ 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 the Dockerfile syntax version 1.10.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 e8d7e04

Please sign in to comment.