mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00

full diff: 92d1fbe1eb...96bcc0dae8
changes included:
- docker/libnetwork#2429 Updating IPAM config with results from HNS create network call
- addresses moby/moby#38358
- docker/libnetwork#2450 Always configure iptables forward policy
- related to moby/moby#14041 and docker/libnetwork#1526
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
38 lines
956 B
Bash
Executable file
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=96bcc0dae898308ed659c5095526788a602f4726
|
|
|
|
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
|
|
}
|
|
|
|
|