diff options
author | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2021-08-04 17:57:09 +0530 |
---|---|---|
committer | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2021-08-10 13:12:59 +0530 |
commit | f1737f24bcc72b08bc13728b56f8b3f50edcff03 (patch) | |
tree | 8c31f5e51a309597650c9f0f44e5349bbbeabd0c /tools/k8s/cluster-deployment/uscni/Dockerfile | |
parent | 220aed1de03317d1ad6f3ebbec9f6b93e44522c7 (diff) |
Add Userspace CNI build-and-run support files.
remove unnecessary spaces
Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
Change-Id: Icfc1dda8a29e896802f8030c5848cc00b4c99389
Diffstat (limited to 'tools/k8s/cluster-deployment/uscni/Dockerfile')
-rw-r--r-- | tools/k8s/cluster-deployment/uscni/Dockerfile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/k8s/cluster-deployment/uscni/Dockerfile b/tools/k8s/cluster-deployment/uscni/Dockerfile new file mode 100644 index 00000000..ddfa3674 --- /dev/null +++ b/tools/k8s/cluster-deployment/uscni/Dockerfile @@ -0,0 +1,25 @@ +# docker build --rm -t uscni +FROM centos:7 +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN yum install -y epel-release wget; yum clean all +RUN wget --no-check-certificate https://golang.org/dl/go1.16.6.linux-amd64.tar.gz +RUN tar -C /usr/local -xzf go1.16.6.linux-amd64.tar.gz +ENV PATH /usr/local/go/bin:$PATH +RUN yum install -y git make sudo; yum clean all +ENV GOPATH /root/go +RUN mkdir -p "/root/go" "$GOPATH/bin" "$GOPATH/src" "$GOPATH/src" && chmod -R 777 "$GOPATH" +WORKDIR /root/go/src/ +ENV GO111MODULE off +RUN go get github.com/intel/userspace-cni-network-plugin > /tmp/UserspaceDockerBuild.log 2>&1 || echo "Can ignore no GO files." +WORKDIR /root/go/src/github.com/intel/userspace-cni-network-plugin +ENV GO111MODULE on +ENV GOROOT /usr/local/go +ENV GOPATH /root/go +RUN make clean && make install-dep && make install && make +RUN cp userspace/userspace /usr/bin/userspace + +FROM alpine:latest +COPY --from=0 /usr/bin/userspace /userspace + +ADD entrypoint.sh / +ENTRYPOINT ["/entrypoint.sh"] |