From f6d99abcf4235b85f42a644634cd468f75624935 Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Wed, 23 Aug 2017 01:25:00 +0000 Subject: [PATCH] Add hostport support Signed-off-by: Lantao Liu --- hack/install-deps.sh | 36 ++++++++++--------- hack/test-cri.sh | 2 +- pkg/server/sandbox_run.go | 30 ++++++++++++++-- pkg/server/sandbox_run_test.go | 66 ++++++++++++++++++++++++++++++++++ pkg/server/sandbox_status.go | 4 +-- pkg/server/sandbox_stop.go | 10 ++++-- pkg/server/service.go | 2 +- 7 files changed, 124 insertions(+), 26 deletions(-) diff --git a/hack/install-deps.sh b/hack/install-deps.sh index d046acf54..9fd99efd2 100755 --- a/hack/install-deps.sh +++ b/hack/install-deps.sh @@ -32,7 +32,7 @@ ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. BUILD_IMAGE=golang:1.8 RUNC_PKG=github.com/opencontainers/runc -CNI_PKG=github.com/containernetworking/cni +CNI_PKG=github.com/containernetworking/plugins CNI_DIR=/opt/cni CNI_CONFIG_DIR=/etc/cni/net.d CONTAINERD_PKG=github.com/containerd/containerd @@ -51,31 +51,33 @@ go get -d ${CNI_PKG}/... cd ${GOPATH}/src/${CNI_PKG} git fetch --all git checkout ${CNI_VERSION} -./build +./build.sh sudo mkdir -p ${CNI_DIR} sudo cp -r ./bin ${CNI_DIR} sudo mkdir -p ${CNI_CONFIG_DIR} -sudo bash -c 'cat >'${CNI_CONFIG_DIR}'/10-containerd-bridge.conf <'${CNI_CONFIG_DIR}'/10-containerd-net.conflist <'${CNI_CONFIG_DIR}'/99-loopback.conf <