Skip to content

Commit

Permalink
Fix Hadolint Errors
Browse files Browse the repository at this point in the history
Signed-off-by: Eoghan Russell <eoghan.russell@intel.com>
  • Loading branch information
Eoghan1232 committed Dec 6, 2023
1 parent 09bcd5c commit 2d2336f
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 20 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/static-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ jobs:
hadolint:
runs-on: ubuntu-latest
name: Hadolint
env:
HADOLINT_RECURSIVE: "true"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
name: Run Hadolint
with:
dockerfile: ./docker/userspacecni/Dockerfile
recursive: true
ignore: DL3008,DL3059

go-check:
Expand Down
11 changes: 7 additions & 4 deletions ci/ovs_test_setup/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM ubuntu:22.04@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f
RUN apt-get -q update && apt-get install -y openvswitch-switch-dpdk
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends 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)"
CMD ["/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 ["./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 ["./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/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
Expand Down

0 comments on commit 2d2336f

Please sign in to comment.