1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/dockerfile/install/proxy.installer
Sebastiaan van Stijn bab58c1924
bump lib network to 92d1fbe1eb0883cf11d283cea8e658275146411d
full diff: 09cdcc8c0e...92d1fbe1eb

relevant changes included (omitting some changes that were added _and_ reverted in this bump):

- docker/libnetwork#2433 Fix parseIP error when parseIP before get AddressFamily
  - fixes docker/libnetwork#2431 parseIP Error ip=[172 17 0 2 0 0 0 0 0 0 0 0 0 0 0 0]
  - https://github.com/docker/libnetwork/issues/2289
  - this was a regression introduced in docker/libnetwork#2416 Fix hardcoded AF_INET for IPv6 address handling
- docker/libnetwork#2440 Bump hashicorp go-sockaddr v1.0.2, go-multierror v1.0.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-03 11:49:06 +02:00

38 lines
956 B
Bash
Executable file

#!/bin/sh
# LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When
# updating the binary version, consider updating github.com/docker/libnetwork
# in vendor.conf accordingly
LIBNETWORK_COMMIT=92d1fbe1eb0883cf11d283cea8e658275146411d
install_proxy() {
case "$1" in
"dynamic")
install_proxy_dynamic
return
;;
"")
export CGO_ENABLED=0
_install_proxy
;;
*)
echo 'Usage: $0 [dynamic]'
;;
esac
}
install_proxy_dynamic() {
export PROXY_LDFLAGS="-linkmode=external" install_proxy
export BUILD_MODE="-buildmode=pie"
_install_proxy
}
_install_proxy() {
echo "Install docker-proxy version $LIBNETWORK_COMMIT"
git clone https://github.com/docker/libnetwork.git "$GOPATH/src/github.com/docker/libnetwork"
cd "$GOPATH/src/github.com/docker/libnetwork"
git checkout -q "$LIBNETWORK_COMMIT"
go build ${BUILD_MODE} -ldflags="$PROXY_LDFLAGS" -o ${PREFIX}/docker-proxy github.com/docker/libnetwork/cmd/proxy
}