Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Fixing Hadolint errors #230

Merged
merged 3 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/static-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
name: Run Hadolint
with:
recursive: true
ignore: DL3008,DL3059
ignore: DL3008,DL3059,DL3015

go-check:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ kind load docker-image testpmd
ovs_e2e_test(){
cd $CI_DIR/ovs_test_setup
./ovs_host.sh
sleep 20
sleep 30

# workaround, cant create in dockerfile
kubectl get all -A
kubectl logs -n ovs pod/ovs-kind-control-plane
kubectl exec -n ovs pod/ovs-kind-control-plane -- bash -c "mkdir -p /dev/net/"
kubectl exec -n ovs pod/ovs-kind-control-plane -- bash -c "mknod /dev/net/tun c 10 200"
kubectl exec -n ovs pod/ovs-kind-control-plane -- bash -c 'ovs-vsctl set Open_vSwitch . "other_config:dpdk-init=true"'
Expand Down
12 changes: 8 additions & 4 deletions ci/ovs_test_setup/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
21 changes: 18 additions & 3 deletions ci/ovs_test_setup/testpmd_image/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
21 changes: 18 additions & 3 deletions docker/testpmd/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
18 changes: 9 additions & 9 deletions docker/userspacecni/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
RUN make generate
RUN go mod tidy
RUN make generate-bin
RUN go mod download \
&& go get go.fd.io/govpp/binapigen/[email protected] \
&& 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
Expand Down