Open envygeeks opened 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.
Any news about this request? It would be nice to keep track of base image files.
+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...
+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.
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 :(
+1
Please fix this - I can't use the Docker Hub build because of it!
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?
+1
+1
this is still very relevant
+1
+1
+1
+1
+1
Is there any update on this?
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.
I think you could use hooks to fetch git LFS data before building the image?
@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.
+1
@eng-akansha Perhaps I'm missing something, but how does bitbucket fit into a GitHub integration with Docker?
So this has been around for nearly 5 years now. Any plans to support git LFS?
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.
Bump. This is getting a bit silly.
I just ran into this issue, definitely wasn't expecting it to still be unresolved.
Bump
Yes, I had lots of problems just because of lacking support for git lfs.
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
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.
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 ./
Build it: docker build -f chrome_installer -t <your organization name>/just-chrome.
Push it up to your private or public repo you created on docker hub. docker push <your organization name>/<your image name>
In your main dockerfile, reference the repo like so:
FROM <your organization name>/just-chrome:latest as hello
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
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.
+1 Still having this issue in 2024 is kind of a stretch..
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.