Skip to content

Commit

Permalink
Merge pull request #5220 from dvdksn/docs-chmod-interpolation
Browse files Browse the repository at this point in the history
docs: dockerfile chmod variable interpolation
  • Loading branch information
crazy-max authored Aug 7, 2024
2 parents 78f24da + 9a8648b commit f6eb72f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions frontend/dockerfile/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1646,6 +1646,18 @@ 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
# syntax=docker/dockerfile:1.10
FROM alpine
WORKDIR /src
ARG MODE=440
COPY --chmod=$MODE . .
```

### COPY --link

```dockerfile
Expand Down

0 comments on commit f6eb72f

Please sign in to comment.