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

Commit 61ac834

Browse files
author
Eoghan Russell
authored
Fixing Hadolint errors (#230)
* Fix Hadolint errors Signed-off-by: Eoghan Russell <[email protected]> * Removing redundancy code Signed-off-by: Eoghan Russell <[email protected]> --------- Signed-off-by: Eoghan Russell <[email protected]>
1 parent 644abac commit 61ac834

File tree

6 files changed

+55
-21
lines changed

6 files changed

+55
-21
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
name: Run Hadolint
5252
with:
5353
recursive: true
54-
ignore: DL3008,DL3059
54+
ignore: DL3008,DL3059,DL3015
5555

5656
go-check:
5757
runs-on: ubuntu-latest

Diff for: ci/ci.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ kubectl exec -n ovs pod/ovs-kind-control-plane -- bash -c 'ovs-vsctl set Open_vS
136136

137137
./testpmd_pod.sh
138138

139-
sleep 30
139+
sleep 20
140140
kubectl get all -A
141141
kubectl logs -n ovs pod/ovs-kind-control-plane
142142
kubectl describe -n ovs pod/ovs-app1-kind-control-plane

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)