Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow override chown user and group in copy commands #1399

Open
arixmkii opened this issue Feb 20, 2021 · 0 comments · May be fixed by #1400
Open

Allow override chown user and group in copy commands #1399

arixmkii opened this issue Feb 20, 2021 · 0 comments · May be fixed by #1400

Comments

@arixmkii
Copy link

Would be nice to have an option to use different user and group applied during COPY step. Same effect could be achieved if explicit chown command added, but it will create a new layer.

Why it could be useful. To apply hardening - to make copied files write protected by the user, which will run application (and so that it would not possible to change it by using chmod with the same user).

Currently we apply this via rewriting commands using map/flatMap, which is not really handy.

Proposal - add 2 more settings chownUser and chownGroup both Option[String], and if they are set to Some value, then it will be used and in case of missing value it will fall back to daemonUser and daemonGroup respectively.

We need this applied for multistage docker, but I guess it is better to add the same logic to ChownCopy as well.

I will sketch a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants