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

Install git-lfs #552

wants to merge 1 commit into from

Install git-lfs #552

wants to merge 1 commit into from


Copy link

@Gillingham Gillingham commented Aug 10, 2017

Since the jenkins git plugin has a LFS option out of the box, this container should support git lfs commands.

Fixes #551

Copy link

@carlossg carlossg commented Aug 14, 2017

This is a base image that people can extend, it should not include extra plugins or packages, for that you can easily create a new image or use Jenkins agents

Copy link

@Gillingham Gillingham commented Aug 14, 2017

What's extra about it? As the image ships now git lfs is supported by the jenkins side, but not the image, it essentially ships with broken functionality.

To expand, this image installs git to support the default git Jenkins plugin (I assume), so it is installing packages. However, the support for the default git plugin is incomplete as it assumes git-lfs which this image lacks.

@rtyler rtyler closed this Aug 14, 2017
Copy link

@rtyler rtyler commented Aug 14, 2017

There are 1300 hundred plugins available for Jenkins, this contained does not (and will not) support each of them "out of the box."

The "Suggest Plugins" are just suggestions by Jenkins, but that doesn't mean that the Docker container will support running code on the master out the box either. Note that there is no Ant, Gradle, or Subversion in this container, despite those being "Suggested.

Generally speaking, this container will not include tools inside the image by default, both to keep the image small, but also to discourage running Pipelines and Jobs on the "master" node, which is very bad for security, as workloads (such as Pipeline from SCM) can access private data within the Jenkins instance.

If you're intent on using Git LFS, and running Pipelines/jobs on your master, then you will need to extend this container and add your tools as necessary

Copy link

@MarkEWaite MarkEWaite commented Aug 19, 2017

Not having Git LFS in the image presents an interesting challenge. If we want to be rigorous about a minimal image, then we probably should not include git in the image either, since it probably should not be required on the master agent.

I suspect git is required on the master agent for Blue Ocean and for Pipeline (even with no executors defined on the master). I haven't checked to confirm it, but I suspect that even with no executors on the master, git commands are executed on the master for Pipeline and for Blue Ocean because the master agent performs "Scan repository" operations and likely uses command line git to do so.

If I'm correct about the requirement for command line git on the master even with no executors, then as soon as a user defines a Pipeline on a git LFS enabled repository, that Pipeline won't be able to checkout LFS managed files on the master. That would be a problem if the user included Jenkinsfile as an LFS managed file. I think it would be a mistake to manage Jenkinsfile as an LFS file, but that's one scenario where this could be a problem.

In case others can benefit, I maintain a docker-lfs repository with an lts-with-plugins branch that includes git-lfs and a set of plugins that are relevant to my testing of the git plugin and the git client plugin. The Dockerfile changes in the lts and lts-with-plugins branches are useful for me and have helped with plugin testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants