Install git-lfs to support Go modules with large-files#492
Install git-lfs to support Go modules with large-files#492danielorbach wants to merge 1 commit intodocker-library:masterfrom
Conversation
|
We usually explicitly avoid doing this and let downstream images add those. We had similar requests in the Node image for git to support package manager but if it's added in the base image it can't be removed in subsequent layers. |
|
We appreciate your contribution ❤️🙇 I agree with @LaurentGoderre that the added size would not acceptable for all users of the images. While useful, For users that need FROM golang:1.21
RUN apt-get update && apt-get install -y git-lfs && rm -rf /var/lib/apt/lists/*Similar issue/request: docker-library/buildpack-deps#112 |
|
Thank you for your response @LaurentGoderre @yosifkit ! Would you like me to amend the Docker image documentation or just leave it as is? |
|
@LaurentGoderre @yosifkit Waiting on you instructions to close this pull-request... |
|
@danielorbach documentation on how to do this would be very welcome! |
|
@LaurentGoderre I'd be glad to extend the documentation! Can you point me to the appropriate repository? I am a bit lost regarding the many repositories involved. |
|
@yosifkit correct me if im wrong but I think it's this file here: https://github.com/docker-library/docs/blob/master/golang/content.md |
This pull-request installs
git-lfson the Linux images to support the download of Go modules from private repositories. The following is true even for public repositories that are downloaded directly (as opposed to downloading from a module-proxy).The Go toolchain uses the local git installation to fetch archives of modules from Git servers directly. My company commits large files using Git LFS which happen to be part of our Go module source tree. Without git-lfs installed, the local git installation does not automatically resolve those files which causes "checksum mismatch" against the committed
go.sum.@yosifkit I have tested that the generated images in-fact resolve the Issue. I'd appreciate your review.
Looking for your guidance on getting this enhancement to the community,