commit fed2b69940336253d57af0ca9c6b541d697fd8ce parent 38fef86562d9082d5b6c01052eb8b681f19ddc87 Author: Nikolay Korotkiy <sikmir@gmail.com> Date: Mon, 25 Jan 2021 22:41:11 +0300 Add docker-git Diffstat:
M | pkgs/default.nix | | | 6 | ++++++ |
A | pkgs/images/git/default.nix | | | 19 | +++++++++++++++++++ |
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -222,6 +222,12 @@ lib.makeScope newScope ( ### IMAGES + docker-git = callPackage ./images/git { + git = pkgs.gitMinimal.override { + perlSupport = false; + nlsSupport = false; + }; + }; docker-mbtileserver = callPackage ./images/mbtileserver { }; docker-quark = callPackage ./images/quark { }; diff --git a/pkgs/images/git/default.nix b/pkgs/images/git/default.nix @@ -0,0 +1,19 @@ +{ dockerTools, git }: + +dockerTools.buildImage { + name = "git"; + tag = git.version; + + contents = [ git ]; + runAsRoot = "mkdir -p /git"; + + config = { + Cmd = [ "${git}/bin/git" "daemon" "--base-path=/git" ]; + Volumes = { + "/git" = { }; + }; + ExposedPorts = { + "9418/tcp" = { }; + }; + }; +}