diff --git a/.github/workflows/static-scan.yml b/.github/workflows/static-scan.yml index d4c11b3b..db130314 100644 --- a/.github/workflows/static-scan.yml +++ b/.github/workflows/static-scan.yml @@ -51,7 +51,7 @@ jobs: name: Run Hadolint with: recursive: true - ignore: DL3008,DL3059 + ignore: DL3008,DL3059,DL3015 go-check: runs-on: ubuntu-latest diff --git a/ci/ci.sh b/ci/ci.sh index 64ca8483..fda2ebe9 100755 --- a/ci/ci.sh +++ b/ci/ci.sh @@ -136,7 +136,7 @@ kubectl exec -n ovs pod/ovs-kind-control-plane -- bash -c 'ovs-vsctl set Open_vS ./testpmd_pod.sh -sleep 30 +sleep 20 kubectl get all -A kubectl logs -n ovs pod/ovs-kind-control-plane kubectl describe -n ovs pod/ovs-app1-kind-control-plane diff --git a/ci/ovs_test_setup/Dockerfile b/ci/ovs_test_setup/Dockerfile index 0d60299f..5f239734 100644 --- a/ci/ovs_test_setup/Dockerfile +++ b/ci/ovs_test_setup/Dockerfile @@ -1,6 +1,10 @@ FROM ubuntu:22.04@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f -RUN apt-get -q update && apt-get install -y openvswitch-switch-dpdk +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN apt-get update -y \ + && apt-get install -y linux-headers-generic openvswitch-switch-dpdk \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* RUN update-alternatives --set ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk -##RUN sed -i "/rmmod bridge/d" /usr/share/openvswitch/scripts/ovs-kmod-ctl -RUN apt install -y linux-headers-$(uname -r) -CMD /usr/share/openvswitch/scripts/ovs-ctl start && sleep inf +# RUN sed -i "/rmmod bridge/d" /usr/share/openvswitch/scripts/ovs-kmod-ctl +RUN apt-get install -y --no-install-recommends linux-headers-"$(uname -r | cut -d'-' -f1)" +CMD ["sh", "-c","/usr/share/openvswitch/scripts/ovs-ctl start && sleep inf"] diff --git a/ci/ovs_test_setup/testpmd_image/Dockerfile b/ci/ovs_test_setup/testpmd_image/Dockerfile index 38ae76ee..9f4ee061 100644 --- a/ci/ovs_test_setup/testpmd_image/Dockerfile +++ b/ci/ovs_test_setup/testpmd_image/Dockerfile @@ -1,9 +1,24 @@ FROM ubuntu:22.04@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f -RUN apt-get -q update && apt-get install -y git vim meson python3-pyelftools libnuma-dev +RUN apt-get -q update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git \ + vim \ + meson \ + python3-pyelftools \ + libnuma-dev \ + python3-pip \ + ninja-build \ + build-essential \ + && pip3 install --no-cache-dir --upgrade meson==1.3.0 \ + && rm -rf /var/lib/apt/lists/* +RUN apt-get update -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates \ + && rm -rf /var/lib/apt/lists/* RUN git clone https://github.com/DPDK/dpdk.git WORKDIR /dpdk/ RUN meson build -RUN cd build && ninja +WORKDIR /dpdk/build/ +RUN ninja WORKDIR /dpdk/build/app COPY ./testpmd.sh testpmd.sh -CMD ./testpmd.sh +CMD ["sh", "-c","./testpmd.sh"] diff --git a/docker/testpmd/Dockerfile b/docker/testpmd/Dockerfile index 38ae76ee..9f4ee061 100644 --- a/docker/testpmd/Dockerfile +++ b/docker/testpmd/Dockerfile @@ -1,9 +1,24 @@ FROM ubuntu:22.04@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f -RUN apt-get -q update && apt-get install -y git vim meson python3-pyelftools libnuma-dev +RUN apt-get -q update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git \ + vim \ + meson \ + python3-pyelftools \ + libnuma-dev \ + python3-pip \ + ninja-build \ + build-essential \ + && pip3 install --no-cache-dir --upgrade meson==1.3.0 \ + && rm -rf /var/lib/apt/lists/* +RUN apt-get update -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates \ + && rm -rf /var/lib/apt/lists/* RUN git clone https://github.com/DPDK/dpdk.git WORKDIR /dpdk/ RUN meson build -RUN cd build && ninja +WORKDIR /dpdk/build/ +RUN ninja WORKDIR /dpdk/build/app COPY ./testpmd.sh testpmd.sh -CMD ./testpmd.sh +CMD ["sh", "-c","./testpmd.sh"] diff --git a/docker/userspacecni/Dockerfile b/docker/userspacecni/Dockerfile index 05453beb..904ee96b 100644 --- a/docker/userspacecni/Dockerfile +++ b/docker/userspacecni/Dockerfile @@ -2,17 +2,17 @@ FROM ligato/vpp-base:23.06@sha256:f68272b0aebe106673c7fffe94b6e6ccd06ecc9afd123e SHELL ["/bin/bash", "-o", "pipefail", "-c"] COPY . /root/userspace-cni-network-plugin WORKDIR /root/userspace-cni-network-plugin -RUN apt-get update -y -RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y binutils wget make git -RUN wget -qO- https://golang.org/dl/go1.20.1.linux-amd64.tar.gz | tar -C /usr/local -xz +RUN apt-get update -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y binutils bash wget make git \ + && wget -qO- https://golang.org/dl/go1.20.1.linux-amd64.tar.gz | tar -C /usr/local -xz \ + && rm -rf /var/lib/apt/lists/* ENV PATH="${PATH}:/usr/local/go/bin" -RUN go mod download -RUN go get go.fd.io/govpp/binapigen/vppapi@v0.7.0 -RUN make generate -RUN go mod tidy -RUN make generate-bin +RUN go mod download \ + && go get go.fd.io/govpp/binapigen/vppapi@v0.7.0 \ + && make generate \ + && go mod tidy \ + && make generate-bin #End of builder container - # Copy build userspace cni bin to a small deployer container FROM alpine:3.18@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978 RUN mkdir -p /root/userspace-cni-network-plugin/userspace