docker: build docker-proxy from moby (#295795)

This commit is contained in:
Aaron Jheng 2024-03-25 18:19:19 +08:00 committed by GitHub
parent fb335f02d5
commit 87f7f762d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 33 deletions

View file

@ -12,7 +12,7 @@ rec {
# package dependencies
, stdenv, fetchFromGitHub, fetchpatch, buildGoPackage
, makeWrapper, installShellFiles, pkg-config, glibc
, go-md2man, go, containerd, runc, docker-proxy, tini, libtool
, go-md2man, go, containerd, runc, tini, libtool
, sqlite, iproute2, docker-buildx, docker-compose, docker-sbom
, iptables, e2fsprogs, xz, util-linux, xfsprogs, git
, procps, rootlesskit, slirp4netns, fuse-overlayfs, nixosTests
@ -137,6 +137,7 @@ rec {
installPhase = ''
cd ./go/src/${goPackagePath}
install -Dm755 ./bundles/dynbinary-daemon/dockerd $out/libexec/docker/dockerd
install -Dm755 ./bundles/dynbinary-daemon/docker-proxy $out/libexec/docker/docker-proxy
makeWrapper $out/libexec/docker/dockerd $out/bin/dockerd \
--prefix PATH : "$out/libexec/docker:$extraPath"
@ -144,7 +145,6 @@ rec {
ln -s ${docker-containerd}/bin/containerd $out/libexec/docker/containerd
ln -s ${docker-containerd}/bin/containerd-shim $out/libexec/docker/containerd-shim
ln -s ${docker-runc}/bin/runc $out/libexec/docker/runc
ln -s ${docker-proxy}/bin/docker-proxy $out/libexec/docker/docker-proxy
ln -s ${docker-tini}/bin/tini-static $out/libexec/docker/docker-init
# systemd
@ -172,7 +172,7 @@ rec {
buildGoPackage (lib.optionalAttrs (!clientOnly) {
# allow overrides of docker components
# TODO: move packages out of the let...in into top-level to allow proper overrides
inherit docker-runc docker-containerd docker-proxy docker-tini moby;
inherit docker-runc docker-containerd docker-tini moby;
} // rec {
pname = "docker";
inherit version;

View file

@ -1,28 +0,0 @@
{ lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
pname = "docker-proxy";
version = "unstable-2020-12-15";
src = fetchFromGitHub {
owner = "docker";
repo = "libnetwork";
rev = "fa125a3512ee0f6187721c88582bf8c4378bd4d7";
sha256 = "1r47y0gww3j7fas4kgiqbhrz5fazsx1c6sxnccdfhj8fzik77s9y";
};
goPackagePath = "github.com/docker/libnetwork";
installPhase = ''
install -m755 -D ./go/bin/proxy $out/bin/docker-proxy
'';
meta = with lib; {
description = "Docker proxy binary to forward traffic between host and containers";
mainProgram = "docker-proxy";
license = licenses.asl20;
homepage = "https://github.com/docker/libnetwork";
maintainers = with maintainers; [vdemeester];
platforms = platforms.linux;
};
}

View file

@ -237,6 +237,7 @@ mapAliases ({
docker-machine = throw "'docker-machine' has been removed, because the upstream project was archived"; # Added 2023-12-27
docker-machine-kvm = throw "'docker-machine-kvm' has been removed, because 'docker-machine' was archived upstream and removed"; # Added 2023-12-27
docker-machine-xhyve = throw "'docker-machine-xhyve' has been removed, because 'docker-machine' was archived upstream and removed"; # Added 2023-12-27
docker-proxy = throw "`docker-proxy` has been merged to the main repo of Moby since Docker 22.06"; # Added 2024-03-14
dogecoin = throw "'dogecoin' has been removed, as it was broken and unmaintained"; # Added 2024-03-11
dogecoind = throw "'dogecoind' has been removed, as it was broken and unmaintained"; # Added 2024-03-11
dolphin-emu-beta = dolphin-emu; # Added 2023-02-11

View file

@ -30609,8 +30609,6 @@ with pkgs;
docker = docker_24;
docker-client = docker.override { clientOnly = true; };
docker-proxy = callPackage ../applications/virtualization/docker/proxy.nix { };
docker-gc = callPackage ../applications/virtualization/docker/gc.nix { };
docker-machine-hyperkit = callPackage ../applications/networking/cluster/docker-machine/hyperkit.nix { };
docker-machine-kvm2 = callPackage ../applications/networking/cluster/docker-machine/kvm2.nix { };