git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Vaibhav Sood <vaibhav_sood@persistent.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Docker image for git
Date: Wed, 25 Oct 2017 13:45:17 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1.1710251330320.6482@virtualbox> (raw)
In-Reply-To: <MAXPR0101MB146810B98D591DDDCA498EEA9B470@MAXPR0101MB1468.INDPRD01.PROD.OUTLOOK.COM>

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

      reply	other threads:[~2017-10-25 11:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 10:38 Docker image for git Vaibhav Sood
2017-10-25 11:45 ` Johannes Schindelin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.1.1710251330320.6482@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=vaibhav_sood@persistent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).