-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
proposal: support for COPY that uses git ls-files as source #1705
Comments
I think you could use context in build command from github commit hash snapshot |
I'm not sure I fully understand your point/suggestion. Can you explain more with an example? This issue could potentially be retitled as a more generic "allow the user to specify arbitrary context" (not sure context is the right word here) but I presented a specific example to start the discussion. There are other cases where having environment variables as the only means of passing context falls short, e.g. #1512 (comment). Being able to "inject" the result of arbitrary commands would allow the user more flexibility/control, with the risk being entirely passed onto them in terms of adverse side effects etc. |
You can build from a git repository, passing the repo address instead of the local dir. Possibility for doing the same for local repos without pushing (but still probably committing) was discussed as a follow-up for #1048 once it makes some progress. |
Thanks @tonistiigi. Yes, I'm looking to do this from a local I think I roughly see the direction in which #1048 is heading but I believe it's slightly different to what I'm proposing/need here (talking specifically about the security concerns of using My understanding of #1048 is that it looks to solve a slightly different problem more aligned with reproducibility of builds, hence the focus on running Would appreciate any guidance if I'm simply holding things wrong! |
Apologies if this is the wrong place to be raising this issue, but I figured given the experiments discussed in https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/experimental.md it might be the best place.
In my limited experience of creating Dockerfiles, I find myself writing
.dockerignore
files that are basically the same as.gitignore
, but with the addition of/.git
.Is there mileage therefore in supporting a mode by which the source of
COPY
is taken fromgit ls-files
, or more generally the output of some command that is then passed as context?Thanks
The text was updated successfully, but these errors were encountered: