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

Add chown flag to ADD and COPY commands #497

Closed
ghost opened this issue Nov 22, 2017 · 6 comments
Closed

Add chown flag to ADD and COPY commands #497

ghost opened this issue Nov 22, 2017 · 6 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Nov 22, 2017

Add support for chown flag to comply with Docker API.
moby/moby#34263

@ghost ghost changed the title Add chown parameter to ADD and COPY commands Add chown flag to ADD and COPY commands Nov 22, 2017
@cdancy
Copy link
Collaborator

cdancy commented Nov 22, 2017

@hermitmaster you can use the generic instruction parameter to add anything you want to a Dockerfile. Give that a go and let me know how it works out.

@cdancy cdancy self-assigned this Nov 22, 2017
@ghost
Copy link
Author

ghost commented Nov 22, 2017

@cdancy That's what I'm doing now and it works just fine, but it would be nice to see first-class support for it since it's part of the API.

@cdancy
Copy link
Collaborator

cdancy commented Nov 23, 2017

@hermitmaster yeah I can appreciate that but personally I go back and forth on designs like this. I personally favor flexibility over rigidness, at least in this context, but that may be more due to my expertise in this area and just wanting things to get out of me more than anything else. I'd entertain a PR for this if you're up for as it shouldn't be bad otherwise I'd just recommend to keep on doing what you're doing.

@cdancy
Copy link
Collaborator

cdancy commented Dec 2, 2017

@hermitmaster closing this as a solution already exists. If someone wants to send in a PR with this functionality I'd be more than happy to review it.

@cdancy cdancy closed this as completed Dec 2, 2017
@ccadek
Copy link

ccadek commented Jan 13, 2023

@hermitmaster you can use the generic instruction parameter to add anything you want to a Dockerfile. Give that a go and let me know how it works out.

The link to the page you mentioned here no longer exists. In the documentation I can unfortunately not find any mention of a generic instruction parameter. I am currently trying to implement COPY with chown and am a little bit stuck as I can not find a way to do this right now.

I am using version 9.1.0

@bmuschko
Copy link
Owner

@ccadek The README file provides links to all documentation pages. Have a look at the Javadoc of the Dockerfile class. It explains all available methods.

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

No branches or pull requests

3 participants