Fix reference to vendor.conf in scripts

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
This commit is contained in:
Shengjing Zhu 2020-11-21 23:13:55 +08:00
parent 089d2183bf
commit 553a369158
3 changed files with 7 additions and 5 deletions

View File

@ -32,7 +32,7 @@ RUN apt-get update && apt-get install -y \
libseccomp-dev \ libseccomp-dev \
--no-install-recommends --no-install-recommends
COPY vendor.conf vendor.conf COPY go.mod go.mod
COPY script/setup/install-runc install-runc COPY script/setup/install-runc install-runc
ARG GOPROXY=direct ARG GOPROXY=direct
ARG GO111MODULE=off ARG GO111MODULE=off

View File

@ -17,14 +17,15 @@
# #
# Builds and installs cni plugins to /opt/cni/bin, # Builds and installs cni plugins to /opt/cni/bin,
# and create basic cni config in /etc/cni/net.d. # and create basic cni config in /etc/cni/net.d.
# The commit defined in vendor.conf # The commit defined in go.mod
# #
set -eu -o pipefail set -eu -o pipefail
CNI_COMMIT=$(grep containernetworking/plugins "$GOPATH"/src/github.com/containerd/containerd/vendor.conf | awk '{print $2}') CNI_COMMIT=$(grep containernetworking/plugins "$GOPATH"/src/github.com/containerd/containerd/go.mod | awk '{print $2}')
CNI_DIR=${DESTDIR:=''}/opt/cni CNI_DIR=${DESTDIR:=''}/opt/cni
CNI_CONFIG_DIR=${DESTDIR}/etc/cni/net.d CNI_CONFIG_DIR=${DESTDIR}/etc/cni/net.d
cd "$GOPATH"
go get -d github.com/containernetworking/plugins/... go get -d github.com/containernetworking/plugins/...
cd "$GOPATH"/src/github.com/containernetworking/plugins cd "$GOPATH"/src/github.com/containernetworking/plugins
git checkout $CNI_COMMIT git checkout $CNI_COMMIT

View File

@ -16,13 +16,14 @@
# #
# Builds and installs runc to /usr/local/go/bin based off # Builds and installs runc to /usr/local/go/bin based off
# the commit defined in vendor.conf # the commit defined in go.mod
# #
set -eu -o pipefail set -eu -o pipefail
function install_runc() { function install_runc() {
RUNC_COMMIT=$(grep opencontainers/runc "$GOPATH"/src/github.com/containerd/containerd/vendor.conf | awk '{print $2}') RUNC_COMMIT=$(grep opencontainers/runc "$GOPATH"/src/github.com/containerd/containerd/go.mod | awk '{print $2}')
cd "$GOPATH"
go get -d github.com/opencontainers/runc go get -d github.com/opencontainers/runc
cd "$GOPATH"/src/github.com/opencontainers/runc cd "$GOPATH"/src/github.com/opencontainers/runc
git checkout $RUNC_COMMIT git checkout $RUNC_COMMIT