From 60b15dfe67dd89f24ec31e32b286acd48e5035f1 Mon Sep 17 00:00:00 2001 From: Kyle Mestery Date: Thu, 14 Jul 2022 11:14:55 -0500 Subject: [PATCH] Fix Dockerfile linting errors Signed-off-by: Kyle Mestery --- build/storage/Dockerfile | 26 +++++++++---------- .../storage/tests/it/test-drivers/Dockerfile | 6 ++--- .../tests/it/traffic-generator/Dockerfile | 5 ++-- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/build/storage/Dockerfile b/build/storage/Dockerfile index 5b88bd64..c1dee90a 100644 --- a/build/storage/Dockerfile +++ b/build/storage/Dockerfile @@ -17,12 +17,11 @@ ARG HTTPS_PROXY ARG NO_PROXY ARG SPDK_VERSION -RUN dnf install -y git +RUN dnf install -y git && dnf clean all COPY spdk/ /spdk RUN mkdir /spdk-rpm COPY core/build_base/pre-install /install -RUN chmod +x /install -RUN /install +RUN chmod +x /install && /install ################################################################################ # spdk @@ -45,13 +44,12 @@ RUN mkdir /spdk-rpm COPY --from=base /spdk-rpm/*.rpm /spdk-rpm/ COPY --from=base /spdk-rpm/fio /spdk-rpm/ -RUN dnf install -y python python3-pip -RUN python -m pip install grpcio grpcio-tools +# hadolint ignore=DL3013 +RUN dnf install -y python python3-pip && dnf clean all && python -m pip install --no-cache-dir grpcio grpcio-tools # Wrap up the image COPY core/build_base/post-install /install -RUN chmod +x /install -RUN /install +RUN chmod +x /install && /install ################################################################################ @@ -67,7 +65,7 @@ ARG HTTP_PROXY ARG HTTPS_PROXY ARG NO_PROXY -RUN dnf install -y socat +RUN dnf install -y socat && dnf clean all COPY core/spdk-app/init /init ENTRYPOINT ["/init"] @@ -99,8 +97,8 @@ ARG HTTP_PROXY ARG HTTPS_PROXY ARG NO_PROXY -RUN dnf install -y socat -RUN pip install pyyaml +# hadolint ignore=DL3013 +RUN dnf install -y socat && dnf clean all && pip install --no-cache-dir pyyaml COPY core/ipu-storage-container/init /init COPY --from=spdk-app /init /init_spdk @@ -121,8 +119,8 @@ ARG HTTP_PROXY ARG HTTPS_PROXY ARG NO_PROXY -RUN dnf install -y python fio python3-pip -RUN python -m pip install grpcio grpcio-tools grpcio-reflection +# hadolint ignore=DL3013 +RUN dnf install -y python fio python3-pip && dnf clean all && python -m pip install --no-cache-dir grpcio grpcio-tools grpcio-reflection COPY core/host-target/init /init COPY core/host-target/*.py / @@ -145,8 +143,8 @@ ARG HTTP_PROXY ARG HTTPS_PROXY ARG NO_PROXY -RUN dnf install -y python fio python3-pip -RUN python -m pip install grpcio-reflection pyfakefs +# hadolint ignore=DL3013 +RUN dnf install -y python fio python3-pip && dnf clean all && python -m pip install --no-cache-dir grpcio-reflection pyfakefs COPY tests/ut/host-target /host-target/tests COPY --from=host-target fio_runner.py /host-target/src/ diff --git a/build/storage/tests/it/test-drivers/Dockerfile b/build/storage/tests/it/test-drivers/Dockerfile index 4bc7efc2..e3d38165 100644 --- a/build/storage/tests/it/test-drivers/Dockerfile +++ b/build/storage/tests/it/test-drivers/Dockerfile @@ -10,10 +10,8 @@ FROM spdk-app AS test-driver ARG HTTP_PROXY ARG HTTPS_PROXY ARG NO_PROXY - -RUN dnf install -y socat -RUN dnf install -y grpc-cli -RUN dnf install -y jq + +RUN dnf install -y socat grpc-cli jq && dnf clean all COPY tests/it/test-drivers/test-helpers /test-helpers COPY scripts/ /scripts diff --git a/build/storage/tests/it/traffic-generator/Dockerfile b/build/storage/tests/it/traffic-generator/Dockerfile index 30987b6c..523beb52 100644 --- a/build/storage/tests/it/traffic-generator/Dockerfile +++ b/build/storage/tests/it/traffic-generator/Dockerfile @@ -20,8 +20,7 @@ ENV no_proxy=$NO_PROXY FROM base as traffic-generator-base -RUN dnf install -y wget -RUN dnf install -y libguestfs-tools-c +RUN dnf install -y wget && dnf install -y libguestfs-tools-c && dnf clean all COPY scripts/vm/prepare_vm.sh /scripts/vm/prepare_vm.sh COPY scripts/run_host_target_container.sh /scripts/run_host_target_container.sh @@ -31,7 +30,7 @@ RUN /scripts/vm/prepare_vm.sh FROM base AS traffic-generator -RUN dnf install -y qemu-kvm +RUN dnf install -y qemu-kvm && dnf clean all COPY tests/it/traffic-generator/init /init COPY --from=traffic-generator-base $DRIVE_TO_BOOT $DRIVE_TO_BOOT COPY /scripts /scripts