Re: Docker image for git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 24 Oct 2017, Vaibhav Sood wrote:

> Want to check if there is a docker image/Dockerfile for git which is
> officially supported?

No I don't want to ;-)

You probably meant to say that you wanted to check that?

> I could not find one under dockerhub official images
> https://hub.docker.com/explore/

I do not think that there is one official Git image. You also have to be
more precise than that: do you mean a Linux-based image or a Windows-based
one?

As far as a Docker image with Git in it: I do not think that this image
itself would be useful. So you can fetch Git repositories? What then?

What most developers do who need Git in their Docker image is to start
with the other requirements: typically a toolchain such as GCC. Or even a
stack such as LAMP or MEAN.

Personally, I use Docker images as base for the build agents used to
perform a few tasks in the Git for Windows project, so they start with the
bare-bones Windows image, add the Visual Studio Team Services build agent,
and then take things from there.

So essentially, I do not think that having a base image just with Git
would be useful. It is much more useful to *add* Git to other base images,
and that is easily done:

Linux (Ubuntu/Debian):

	sudo apt-get install git


Windows:

	$Version = "2.14.3"
	$Base = "https://github.com/git-for-windows/git/releases/download/v";
	$Url = $Base + $Version + "MinGit-" + $Version + "-64-bit.zip"
	$Path = "$HOME\Downloads\MinGit.zip"
	$Dir = "$HOME\MinGit"
	$WebClient = New-Object System.Net.WebClient
	$WebClient.DownloadFile($Url, $Path)
	Add-Type -AssemblyName System.IO.Compression.FileSystem
	[System.IO.Compression.ZipFile]::ExtractToDirectory($Path, $Dir)


Ciao,
Johannes



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux