Skip to content

Conversation

@dvdksn
Copy link
Collaborator

@dvdksn dvdksn commented Dec 19, 2025

not translate between Linux and Windows, the use of `/etc/passwd` and `/etc/group` for
translating user and group names to IDs restricts this feature to only be viable for
Linux OS-based containers.
The `--chmod` flag is not supported when building Windows containers.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk if this is worth mentioning still, it was probably a leftover from when this doc described the legacy builder. But I guess it doesn't hurt; still applies in the (experimental) wcow case.

@dvdksn dvdksn requested a review from tonistiigi December 19, 2025 08:45
```

The `--chmod` flag supports octal notation (e.g., `755`, `644`).
Symbolic notation (e.g., `+x`, `g=u`) requires the `docker/dockerfile:1-labs`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.14+ , no labs

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

The `--chmod` flag supports octal notation (e.g., `755`, `644`).
Symbolic notation (e.g., `+x`, `g=u`) requires the `docker/dockerfile:1-labs`
syntax directive. This is useful when octal isn't flexible enough. For example,
`u=rwX,go=rX` sets directories to 755 and files to 644, while preserving the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link to man chmod like https://man.freebsd.org/cgi/man.cgi?chmod for a longer explanation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@dvdksn dvdksn force-pushed the chmod-nonoctal-docs branch from 2ba142c to fc93370 Compare January 9, 2026 16:45
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
@dvdksn dvdksn force-pushed the chmod-nonoctal-docs branch from fc93370 to 0af0054 Compare January 9, 2026 16:48
@tonistiigi tonistiigi merged commit e41f4a8 into moby:master Jan 10, 2026
59 checks passed
@dvdksn dvdksn deleted the chmod-nonoctal-docs branch January 12, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants