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

Commit 4911d78

Browse files
author
Eoghan Russell
committed
Fix Hadolint errors
Signed-off-by: Eoghan Russell <[email protected]>
1 parent 09bcd5c commit 4911d78

File tree

6 files changed

+60
-22
lines changed

6 files changed

+60
-22
lines changed

Diff for: .github/workflows/static-scan.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ jobs:
4343
hadolint:
4444
runs-on: ubuntu-latest
4545
name: Hadolint
46+
env:
47+
HADOLINT_RECURSIVE: "true"
4648
steps:
4749
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
4850
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
4951
name: Run Hadolint
5052
with:
51-
dockerfile: ./docker/userspacecni/Dockerfile
52-
ignore: DL3008,DL3059
53+
recursive: true
54+
ignore: DL3008,DL3059,DL3015
5355

5456
go-check:
5557
runs-on: ubuntu-latest

Diff for: ci/ci.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,11 @@ kind load docker-image testpmd
127127
ovs_e2e_test(){
128128
cd $CI_DIR/ovs_test_setup
129129
./ovs_host.sh
130-
sleep 20
130+
sleep 30
131131

132132
# workaround, cant create in dockerfile
133+
kubectl get all -A
134+
kubectl logs -n ovs pod/ovs-kind-control-plane
133135
kubectl exec -n ovs pod/ovs-kind-control-plane -- bash -c "mkdir -p /dev/net/"
134136
kubectl exec -n ovs pod/ovs-kind-control-plane -- bash -c "mknod /dev/net/tun c 10 200"
135137
kubectl exec -n ovs pod/ovs-kind-control-plane -- bash -c 'ovs-vsctl set Open_vSwitch . "other_config:dpdk-init=true"'

Diff for: ci/ovs_test_setup/Dockerfile

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
FROM ubuntu:22.04@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f
2-
RUN apt-get -q update && apt-get install -y openvswitch-switch-dpdk
2+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
3+
RUN apt-get update -y \
4+
&& apt-get install -y linux-headers-generic openvswitch-switch-dpdk \
5+
&& apt-get clean \
6+
&& rm -rf /var/lib/apt/lists/*
37
RUN update-alternatives --set ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk
4-
##RUN sed -i "/rmmod bridge/d" /usr/share/openvswitch/scripts/ovs-kmod-ctl
5-
RUN apt install -y linux-headers-$(uname -r)
6-
CMD /usr/share/openvswitch/scripts/ovs-ctl start && sleep inf
8+
# RUN sed -i "/rmmod bridge/d" /usr/share/openvswitch/scripts/ovs-kmod-ctl
9+
RUN apt-get install -y --no-install-recommends linux-headers-"$(uname -r | cut -d'-' -f1)"
10+
CMD ["sh", "-c","/usr/share/openvswitch/scripts/ovs-ctl start && sleep inf"]

Diff for: ci/ovs_test_setup/testpmd_image/Dockerfile

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
FROM ubuntu:22.04@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f
2-
RUN apt-get -q update && apt-get install -y git vim meson python3-pyelftools libnuma-dev
2+
RUN apt-get -q update \
3+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
4+
git \
5+
vim \
6+
meson \
7+
python3-pyelftools \
8+
libnuma-dev \
9+
python3-pip \
10+
ninja-build \
11+
build-essential \
12+
&& pip3 install --no-cache-dir --upgrade meson==1.3.0 \
13+
&& rm -rf /var/lib/apt/lists/*
14+
RUN apt-get update -y \
15+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates \
16+
&& rm -rf /var/lib/apt/lists/*
317
RUN git clone https://github.com/DPDK/dpdk.git
418
WORKDIR /dpdk/
519
RUN meson build
6-
RUN cd build && ninja
20+
WORKDIR /dpdk/build/
21+
RUN ninja
722
WORKDIR /dpdk/build/app
823
COPY ./testpmd.sh testpmd.sh
9-
CMD ./testpmd.sh
24+
CMD ["sh", "-c","./testpmd.sh"]

Diff for: docker/testpmd/Dockerfile

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
FROM ubuntu:22.04@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f
2-
RUN apt-get -q update && apt-get install -y git vim meson python3-pyelftools libnuma-dev
2+
RUN apt-get -q update \
3+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
4+
git \
5+
vim \
6+
meson \
7+
python3-pyelftools \
8+
libnuma-dev \
9+
python3-pip \
10+
ninja-build \
11+
build-essential \
12+
&& pip3 install --no-cache-dir --upgrade meson==1.3.0 \
13+
&& rm -rf /var/lib/apt/lists/*
14+
RUN apt-get update -y \
15+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates \
16+
&& rm -rf /var/lib/apt/lists/*
317
RUN git clone https://github.com/DPDK/dpdk.git
418
WORKDIR /dpdk/
519
RUN meson build
6-
RUN cd build && ninja
20+
WORKDIR /dpdk/build/
21+
RUN ninja
722
WORKDIR /dpdk/build/app
823
COPY ./testpmd.sh testpmd.sh
9-
CMD ./testpmd.sh
24+
CMD ["sh", "-c","./testpmd.sh"]

Diff for: docker/userspacecni/Dockerfile

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ FROM ligato/vpp-base:23.06@sha256:f68272b0aebe106673c7fffe94b6e6ccd06ecc9afd123e
22
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
33
COPY . /root/userspace-cni-network-plugin
44
WORKDIR /root/userspace-cni-network-plugin
5-
RUN apt-get update -y
6-
RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y binutils wget make git
7-
RUN wget -qO- https://golang.org/dl/go1.20.1.linux-amd64.tar.gz | tar -C /usr/local -xz
5+
RUN apt-get update -y \
6+
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y binutils bash wget make git \
7+
&& wget -qO- https://golang.org/dl/go1.20.1.linux-amd64.tar.gz | tar -C /usr/local -xz \
8+
&& rm -rf /var/lib/apt/lists/*
89
ENV PATH="${PATH}:/usr/local/go/bin"
9-
RUN go mod download
10-
RUN go get go.fd.io/govpp/binapigen/[email protected]
11-
RUN make generate
12-
RUN go mod tidy
13-
RUN make generate-bin
10+
RUN go mod download \
11+
&& go get go.fd.io/govpp/binapigen/[email protected] \
12+
&& make generate \
13+
&& go mod tidy \
14+
&& make generate-bin
1415
#End of builder container
15-
1616
# Copy build userspace cni bin to a small deployer container
1717
FROM alpine:3.18@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978
1818
RUN mkdir -p /root/userspace-cni-network-plugin/userspace

0 commit comments

Comments
 (0)