We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de65ae6 commit 9a8648bCopy full SHA for 9a8648b
frontend/dockerfile/docs/reference.md
@@ -1646,6 +1646,18 @@ If the container root filesystem doesn't contain either `/etc/passwd` or
1646
flag, the build will fail on the `COPY` operation. Using numeric IDs requires
1647
no lookup and does not depend on container root filesystem content.
1648
1649
+With the Dockerfile syntax version 1.10.0 and later,
1650
+the `--chmod` flag supports variable interpolation,
1651
+which lets you define the permission bits using build arguments:
1652
+
1653
+```dockerfile
1654
+# syntax=docker/dockerfile:1.10
1655
+FROM alpine
1656
+WORKDIR /src
1657
+ARG MODE=440
1658
+COPY --chmod=$MODE . .
1659
+```
1660
1661
### COPY --link
1662
1663
```dockerfile
0 commit comments