From 8363eddd97b50e9efe78f300f1310cedcc55bf6e Mon Sep 17 00:00:00 2001 From: Ruslan Mstoi Date: Fri, 19 May 2023 16:29:44 +0300 Subject: [PATCH] Dockerfile: fix hadolint error, do not install recommended packages hadolint error: DL3015 info: Avoid additional packages by specifying `--no-install-recommends` Add required packages ca-certificates unzip iproute2 dbus Without these packages build or integration tests fail if --no-install-recommends is specified. Previously these packages were installed as part of recommended dependency packages. Signed-off-by: Ruslan Mstoi --- resources/Dockerfile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/resources/Dockerfile b/resources/Dockerfile index e640dec46..2e1ef8907 100644 --- a/resources/Dockerfile +++ b/resources/Dockerfile @@ -18,9 +18,11 @@ ENV PATH="$PATH:$CARGO_HOME/bin" ENV DEBIAN_FRONTEND=noninteractive # Install all CI dependencies +# DL3015 ignored cause not installing openvswitch-switch-dpdk recommended packages breaks ovs_dpdk test +# hadolint ignore=DL3008,DL3015 RUN apt-get update \ && apt-get -yq upgrade \ - && apt-get install -yq \ + && apt-get install --no-install-recommends -yq \ build-essential \ bc \ curl \ @@ -45,7 +47,6 @@ RUN apt-get update \ python3 \ python3-setuptools \ ntfs-3g \ - openvswitch-switch-dpdk \ python3-distutils \ uuid-dev \ iperf3 \ @@ -53,6 +54,11 @@ RUN apt-get update \ git-core \ dnsmasq \ dmsetup \ + ca-certificates \ + unzip \ + iproute2 \ + dbus \ + && apt-get install openvswitch-switch-dpdk -yq \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/log/*log /var/log/apt/* /var/lib/dpkg/*-old /var/cache/debconf/*-old @@ -61,7 +67,7 @@ RUN update-alternatives --set ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs- RUN if [ "$TARGETARCH" = "amd64" ]; then \ apt-get update \ && apt-get -yq upgrade \ - && apt-get install -yq gcc-multilib gawk \ + && apt-get install --no-install-recommends -yq gcc-multilib gawk \ libtool expect gnutls-dev gnutls-bin libfuse-dev \ libjson-glib-dev libgmp-dev libtasn1-dev python3-twisted \ net-tools softhsm2 \ @@ -75,7 +81,7 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ # kernel (any version) image in `/boot` and modules in `/lib/modules`. apt-get update \ && apt-get -yq upgrade \ - && apt-get install -yq \ + && apt-get install --no-install-recommends -yq \ libcap2-bin \ libguestfs-tools \ linux-image-generic \