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

Commit 2d2336f

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

File tree

5 files changed

+55
-20
lines changed

5 files changed

+55
-20
lines changed

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ 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
53+
recursive: true
5254
ignore: DL3008,DL3059
5355

5456
go-check:

Diff for: ci/ovs_test_setup/Dockerfile

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
FROM ubuntu:22.04@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f
2-
RUN apt-get -q update && apt-get install -y openvswitch-switch-dpdk
2+
RUN apt-get update -y \
3+
&& apt-get install -y --no-install-recommends openvswitch-switch-dpdk \
4+
&& apt-get clean \
5+
&& rm -rf /var/lib/apt/lists/*
36
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
7+
# RUN sed -i "/rmmod bridge/d" /usr/share/openvswitch/scripts/ovs-kmod-ctl
8+
RUN apt-get install -y --no-install-recommends linux-headers-"$(uname -r)"
9+
CMD ["/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 ["./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 ["./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)