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

Support for ADD <git ref> in Containerfile #4974

Open
dustymabe opened this issue Aug 12, 2023 · 18 comments · May be fixed by #5438
Open

Support for ADD <git ref> in Containerfile #4974

dustymabe opened this issue Aug 12, 2023 · 18 comments · May be fixed by #5438
Assignees

Comments

@dustymabe
Copy link

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?

@flouthoc
Copy link
Collaborator

flouthoc commented Aug 12, 2023

@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.

@nalind
Copy link
Member

nalind commented Aug 14, 2023

ADD doesn't do any special handling for what look like Git repository locations, no.

@rhatdan
Copy link
Member

rhatdan commented Aug 14, 2023

If docker supports it, so should we.

@danishprakash
Copy link
Contributor

Mind If I take a look at this?

@rhatdan
Copy link
Member

rhatdan commented Sep 12, 2023

SGTM

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Oct 13, 2023

@danishprakash any progress?

@danishprakash
Copy link
Contributor

Not yet, I'll take a look at it end of next week.

Copy link

A friendly reminder that this issue had no activity for 30 days.

@jfroy
Copy link
Contributor

jfroy commented Nov 30, 2023

I might take a stab at this if @danishprakash has more important stuff to do.

@rhatdan
Copy link
Member

rhatdan commented Dec 1, 2023

After 30 days it is up for grabs. go for it.

@douglascamata
Copy link

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.

@douglascamata
Copy link

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?

@rhatdan
Copy link
Member

rhatdan commented Mar 2, 2024

@jfroy did you ever get a chance to work on it?

@jfroy
Copy link
Contributor

jfroy commented Mar 3, 2024

Not yet, haven't had the time.

@rhatdan
Copy link
Member

rhatdan commented Mar 4, 2024

I think most of the code is in something like:

path, subdir, err := define.TempDirForURL(tmpdir.GetTempDir(), internal.BuildahExternalArtifactsDir, src)

@danishprakash
Copy link
Contributor

I can start looking at it now, is this still open?

@jfroy
Copy link
Contributor

jfroy commented Mar 14, 2024

I can start looking at it now, is this still open?

Yep, I haven't started! Take it.

Aeron added a commit to Aeron/mimalloc-container that referenced this issue Mar 25, 2024
Updates the publishing action. Replaces Buildah/Podman stuff with Docker Buildx because of containers/buildah#4974.
@danishprakash danishprakash linked a pull request Mar 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants