docker / hub-feedback

Feedback and bug reports for the Docker Hub
https://hub.docker.com
233 stars 48 forks source link

Add support for Git LFS. #500

Open envygeeks opened 8 years ago

envygeeks commented 8 years ago

Please add support for git LFS. It would make building some images significantly faster since we can cache internet heavy pieces on Github and pull them into the context with Git LFS.

ceturc commented 8 years ago

I too would benefit from Git LFS support with the GitHub integration.

My big Docker projects have some large assets.

The present workaround, trying to manage curl/wget scripts inside my Dockerfile for larger assets, is brittle and doesn't scale, as I have to keep big files one place (via curl/wget) and my small files in GitHub.

It works best if all of my build assets (big and small) are in my GitHub repo.

rafaelsoaresbr commented 8 years ago

Any news about this request? It would be nice to keep track of base image files.

bchr02 commented 7 years ago

+1

I have a folder on my local computer that I can docker build... successfully, however when I moved the contents to a GitHub repository I needed to use LFS because some of the files were too big. So I did and pushed upstream to GitHub. I then tried adding this repository as an automated build within docker hub but it keeps failing on build...

jmbmxer commented 7 years ago

+1

I am also running into issues on Docker Hub when building images from a repo that uses git lfs. I will have to setup a wget workaround for now.

donkeyx commented 7 years ago

I am having the same problem. I have added a few rpm's using git-lfs, but it does not pull the files down, which then breaks the copy + build:

error: skipping https://git-lfs.github.com/spec/v1 - transfer failed

In my case, the repos are protected so I cannot just wget them either. I am so close to my first clean container and blocked right at the finish line :(

ghost commented 7 years ago

+1

Please fix this - I can't use the Docker Hub build because of it!

delitescere commented 7 years ago

Hi team - is there a particular obstacle to adopting this?

@nandhini915 Does it just need someone in the community to take a crack at it? If so, any pointers/recommendations on how to proceed?

msaeed-iva commented 6 years ago

+1

jeromeky commented 6 years ago

+1

esperancaJS commented 6 years ago

this is still very relevant

straticsryan commented 6 years ago

+1

1082008 commented 6 years ago

+1

veuncent commented 5 years ago

+1

gtoff commented 5 years ago

+1

JoshLuxton commented 5 years ago

+1

WiMills commented 4 years ago

Is there any update on this?

Nebuchadrezzar commented 4 years ago

Docker Hub documentation lists this as a limitation: https://beta.docs.docker.com/v17.12/docker-hub/builds/#prerequisites. It also directs us to this specific ticket. Therefore, it would be helpful to know if this ticket is the appropriate place to look for a status/updates of this issue.

mitar commented 4 years ago

I think you could use hooks to fetch git LFS data before building the image?

delitescere commented 4 years ago

@mitar I believe you'd also have to include Git LFS binaries in your source code repo, which seems like a circular solution ;-), or run a dockerized version of it which seems like a lot of messing about for something that is a fairly straightforward proposition.

It would be awesome if @nandhini915 or someone else at Docker would take a look at this, at least provide pointers/recommendations on how to proceed.

markegge commented 4 years ago

+1

Nebuchadrezzar commented 4 years ago

@eng-akansha Perhaps I'm missing something, but how does bitbucket fit into a GitHub integration with Docker?

marcusyoung commented 3 years ago

So this has been around for nearly 5 years now. Any plans to support git LFS?

github-actions[bot] commented 3 years ago

We are clearing up our old issues and your ticket has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 15 days.

delitescere commented 3 years ago

Bump. This is getting a bit silly.

c-aydin commented 2 years ago

I just ran into this issue, definitely wasn't expecting it to still be unresolved.

jakeleventhal commented 2 years ago

Bump

faruknane commented 2 years ago

Yes, I had lots of problems just because of lacking support for git lfs.

OtenMoten commented 1 year ago

I created this issue on Stackoveflow: https://stackoverflow.com/questions/73944739/spring-boot-java-jar-file-corrupt-in-docker-image-via-docker-hub-since-using

billyliuschill commented 1 year ago

I was just as frustrated with this issue, but I found a workaround. The trick is to build it a separate Dockerfile image locally that only contains the LFS files you will be using. Then push it up and reference it in the main Dockerfile. This is not an ideal way to do things, but it gets the automated build working for any LFS files.

As an example, I want to install google chrome, but every time I reference this .deb file, docker hub automated builds would fail and return the lfs hash instead.

  1. Create another Dockerfile and have this image contain the files that you will later copy into your image.

Here's my simple file that copies the chrome installer from host into my dockerfile. I will label this docker image as chrome_installer.

Dockerfile: FROM ubuntu:22.04 COPY google-chrome-stable_current_amd64.deb ./

  1. Build it: docker build -f chrome_installer -t <your organization name>/just-chrome.

  2. Push it up to your private or public repo you created on docker hub. docker push <your organization name>/<your image name>

  3. In your main dockerfile, reference the repo like so:

FROM <your organization name>/just-chrome:latest as hello

  1. Then copy file(s) from that repo you referenced from host into the docker image being built like so: COPY --from=hello google-chrome-stable_current_amd64.deb google-chrome-stable_current_amd64.deb

  2. Install into docker image: If you are using Ubuntu, then install the .deb file like so. RUN dpkg --install google-chrome-stable_current_amd64.deb

Let me know if this works for you by thumbing up this comment.

BobanNikolov commented 1 month ago

+1 Still having this issue in 2024 is kind of a stretch..