buildah
buildah copied to clipboard
Support for ADD <git ref> in Containerfile
It seems Dockerfile supports adding a git repo files via:
ADD [--keep-git-dir=<boolean>] <git ref> <dir>
https://docs.docker.com/engine/reference/builder/#adding-a-git-repository-add-git-ref-dir
Do we support that? Can we support that?
@dustymabe Thanks for creating the issue.
Do we support that?
Afaik No, buildah supports adding contents from remote URL but it does not treats git
or git ref
as a special case. @nalind Could you confirm please.
Can we support that ?
Sure this can be implemented.
ADD doesn't do any special handling for what look like Git repository locations, no.
If docker supports it, so should we.
Mind If I take a look at this?
SGTM
A friendly reminder that this issue had no activity for 30 days.
@danishprakash any progress?
Not yet, I'll take a look at it end of next week.
A friendly reminder that this issue had no activity for 30 days.
I might take a stab at this if @danishprakash has more important stuff to do.
After 30 days it is up for grabs. go for it.
Would love to see this feature make it to buildah and eventually podman. Docker's been supporting it since a while and it's not under any sort of experimental flag.
In the mean time, do any of you have a suggested workaround that's not going to mess up image layer caching (like git clone
) and stays within the Dockerfile?
@jfroy did you ever get a chance to work on it?
Not yet, haven't had the time.
I think most of the code is in something like:
path, subdir, err := define.TempDirForURL(tmpdir.GetTempDir(), internal.BuildahExternalArtifactsDir, src)
I can start looking at it now, is this still open?
I can start looking at it now, is this still open?
Yep, I haven't started! Take it.