Skip to content

Commit b8ee32d

Browse files
paralinjacmet
authored andcommitted
docker-proxy: new package
Add docker-proxy package to Buildroot. Needed by docker-engine at runtime, and previously not included. This leads to the following error when attempting to port-map ports to a container: $ docker run -p 8080:8080 nginx docker: Error response from daemon: driver failed programming external connectivity on endpoint: exec: "docker-proxy": executable file not found in $PATH. Docker expects the docker-proxy binary to exist in the PATH. Signed-off-by: Christian Stewart <[email protected]> Signed-off-by: Peter Korsgaard <[email protected]> (cherry picked from commit 8175041) Signed-off-by: Peter Korsgaard <[email protected]>
1 parent 1d51cb1 commit b8ee32d

File tree

5 files changed

+69
-0
lines changed

5 files changed

+69
-0
lines changed

DEVELOPERS

+1
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ F: package/aufs-util/
419419
F: package/batman-adv/
420420
F: package/docker-containerd/
421421
F: package/docker-engine/
422+
F: package/docker-proxy/
422423
F: package/mosh/
423424
F: package/rtl8821au/
424425
F: package/runc/

package/Config.in

+1
Original file line numberDiff line numberDiff line change
@@ -1946,6 +1946,7 @@ menu "System tools"
19461946
source "package/debianutils/Config.in"
19471947
source "package/docker-containerd/Config.in"
19481948
source "package/docker-engine/Config.in"
1949+
source "package/docker-proxy/Config.in"
19491950
source "package/dsp-tools/Config.in"
19501951
source "package/efibootmgr/Config.in"
19511952
source "package/efivar/Config.in"

package/docker-proxy/Config.in

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
config BR2_PACKAGE_DOCKER_PROXY
2+
bool "docker-proxy"
3+
depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
4+
depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
5+
depends on BR2_TOOLCHAIN_HAS_THREADS
6+
help
7+
Libnetwork is a Container Network Model that provides a
8+
consistent programming interface and the required network
9+
abstractions for applications.
10+
11+
This package provides docker-proxy, a run-time dependency of
12+
Docker.
13+
14+
https://github.com/docker/libnetwork
15+
16+
comment "docker-proxy needs a toolchain w/ threads"
17+
depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
18+
depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
19+
depends on !BR2_TOOLCHAIN_HAS_THREADS
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Locally calculated
2+
sha256 2eee331b6ded567a36e7db708405b34032b93938682cf049025f48b96d755bf6 docker-proxy-7b2b1feb1de4817d522cc372af149ff48d25028e.tar.gz

package/docker-proxy/docker-proxy.mk

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
################################################################################
2+
#
3+
# docker-proxy
4+
#
5+
################################################################################
6+
7+
DOCKER_PROXY_VERSION = 7b2b1feb1de4817d522cc372af149ff48d25028e
8+
DOCKER_PROXY_SITE = $(call github,docker,libnetwork,$(DOCKER_PROXY_VERSION))
9+
10+
DOCKER_PROXY_LICENSE = Apache-2.0
11+
DOCKER_PROXY_LICENSE_FILES = LICENSE
12+
13+
DOCKER_PROXY_DEPENDENCIES = host-go host-pkgconf
14+
15+
DOCKER_PROXY_GOPATH = "$(@D)/gopath"
16+
DOCKER_PROXY_MAKE_ENV = $(HOST_GO_TARGET_ENV) \
17+
CGO_ENABLED=1 \
18+
CGO_NO_EMULATION=1 \
19+
GOBIN="$(@D)/bin" \
20+
GOPATH="$(DOCKER_PROXY_GOPATH)" \
21+
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
22+
$(TARGET_MAKE_ENV)
23+
24+
ifeq ($(BR2_STATIC_LIBS),y)
25+
DOCKER_PROXY_GLDFLAGS += -extldflags '-static'
26+
endif
27+
28+
define DOCKER_PROXY_CONFIGURE_CMDS
29+
mkdir -p $(DOCKER_PROXY_GOPATH)/src/github.com/docker
30+
ln -fs $(@D) $(DOCKER_PROXY_GOPATH)/src/github.com/docker/libnetwork
31+
endef
32+
33+
define DOCKER_PROXY_BUILD_CMDS
34+
cd $(@D)/gopath/src/github.com/docker/libnetwork; \
35+
$(DOCKER_PROXY_MAKE_ENV) \
36+
$(HOST_DIR)/usr/bin/go build -v \
37+
-o $(@D)/bin/docker-proxy \
38+
-ldflags "$(DOCKER_PROXY_GLDFLAGS)" \
39+
github.com/docker/libnetwork/cmd/proxy
40+
endef
41+
42+
define DOCKER_PROXY_INSTALL_TARGET_CMDS
43+
$(INSTALL) -D -m 0755 $(@D)/bin/docker-proxy $(TARGET_DIR)/usr/bin/docker-proxy
44+
endef
45+
46+
$(eval $(generic-package))

0 commit comments

Comments
 (0)