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

Add support for Git LFS. #500

Open
envygeeks opened this issue Dec 5, 2015 · 30 comments
Open

Add support for Git LFS. #500

envygeeks opened this issue Dec 5, 2015 · 30 comments

Comments

@envygeeks
Copy link

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
Copy link

ceturc commented Feb 24, 2016

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
Copy link

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

@bchr02
Copy link

bchr02 commented Aug 31, 2016

+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
Copy link

jmbmxer commented Sep 9, 2016

+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
Copy link

donkeyx commented Sep 27, 2016

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
Copy link

ghost commented Dec 20, 2016

+1

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

@delitescere
Copy link

delitescere commented May 23, 2017

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
Copy link

+1

1 similar comment
@jeromeky
Copy link

+1

@esperancaJS
Copy link

this is still very relevant

@straticsryan
Copy link

+1

2 similar comments
@1082008
Copy link

1082008 commented May 19, 2018

+1

@veuncent
Copy link

veuncent commented Aug 5, 2018

+1

@gtoff
Copy link

gtoff commented Dec 7, 2018

+1

1 similar comment
@JoshLuxton
Copy link

+1

kgeorge314 added a commit to aleta-systems/aletasystems.role.data.engineer.phase1 that referenced this issue Jul 10, 2019
Short Summary
When the container is built from Docker Hub, the file `WideWorldImporters-Full.bak` is
not copied into the container. This is because docker hub, doesn't support GIT LFS.

Error Message: `The volume on device '/var/opt/sqlserver/WideWorldImporters-Full.bak' is empty.`

Why is it necessary? (Bug fix, feature, improvements?)
- Database was not restoring

How does the change address the issue?
- Using ADD which can access files from URL's

Include a link to the ticket, if any.
- docker/hub-feedback#500
@WiMills
Copy link

WiMills commented Aug 27, 2019

Is there any update on this?

@Nebuchadrezzar
Copy link

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
Copy link

mitar commented Oct 3, 2019

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

@delitescere
Copy link

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

ccaominh added a commit to ccaominh/intellij-inspect that referenced this issue Jan 10, 2020
git lfs is not supported by docker automated builds:
docker/hub-feedback#500
ccaominh added a commit to ccaominh/intellij-inspect that referenced this issue Jan 10, 2020
git lfs is not supported by docker automated builds:
docker/hub-feedback#500
ccaominh added a commit to ccaominh/intellij-inspect that referenced this issue Jan 10, 2020
git lfs is not supported by docker automated builds:
docker/hub-feedback#500
@markegge
Copy link

+1

@Nebuchadrezzar
Copy link

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

@marcusyoung
Copy link

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

@github-actions
Copy link

github-actions bot commented Jun 2, 2021

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.

@github-actions github-actions bot added the Stale label Jun 2, 2021
@delitescere
Copy link

Bump. This is getting a bit silly.

@github-actions github-actions bot removed the Stale label Jun 3, 2021
@c-aydin
Copy link

c-aydin commented Aug 16, 2021

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

@jakeleventhal
Copy link

Bump

@faruknane
Copy link

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

@OtenMoten
Copy link

OtenMoten commented Oct 3, 2022

@billyliuschill
Copy link

billyliuschill commented Feb 15, 2023

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
Copy link

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

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

No branches or pull requests