Skip to content

Commit 60b15df

Browse files
committed
Fix Dockerfile linting errors
Signed-off-by: Kyle Mestery <[email protected]>
1 parent 8ebc51f commit 60b15df

File tree

3 files changed

+16
-21
lines changed

3 files changed

+16
-21
lines changed

build/storage/Dockerfile

+12-14
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ ARG HTTPS_PROXY
1717
ARG NO_PROXY
1818
ARG SPDK_VERSION
1919

20-
RUN dnf install -y git
20+
RUN dnf install -y git && dnf clean all
2121
COPY spdk/ /spdk
2222
RUN mkdir /spdk-rpm
2323
COPY core/build_base/pre-install /install
24-
RUN chmod +x /install
25-
RUN /install
24+
RUN chmod +x /install && /install
2625

2726
################################################################################
2827
# spdk
@@ -45,13 +44,12 @@ RUN mkdir /spdk-rpm
4544
COPY --from=base /spdk-rpm/*.rpm /spdk-rpm/
4645
COPY --from=base /spdk-rpm/fio /spdk-rpm/
4746

48-
RUN dnf install -y python python3-pip
49-
RUN python -m pip install grpcio grpcio-tools
47+
# hadolint ignore=DL3013
48+
RUN dnf install -y python python3-pip && dnf clean all && python -m pip install --no-cache-dir grpcio grpcio-tools
5049

5150
# Wrap up the image
5251
COPY core/build_base/post-install /install
53-
RUN chmod +x /install
54-
RUN /install
52+
RUN chmod +x /install && /install
5553

5654

5755
################################################################################
@@ -67,7 +65,7 @@ ARG HTTP_PROXY
6765
ARG HTTPS_PROXY
6866
ARG NO_PROXY
6967

70-
RUN dnf install -y socat
68+
RUN dnf install -y socat && dnf clean all
7169
COPY core/spdk-app/init /init
7270

7371
ENTRYPOINT ["/init"]
@@ -99,8 +97,8 @@ ARG HTTP_PROXY
9997
ARG HTTPS_PROXY
10098
ARG NO_PROXY
10199

102-
RUN dnf install -y socat
103-
RUN pip install pyyaml
100+
# hadolint ignore=DL3013
101+
RUN dnf install -y socat && dnf clean all && pip install --no-cache-dir pyyaml
104102

105103
COPY core/ipu-storage-container/init /init
106104
COPY --from=spdk-app /init /init_spdk
@@ -121,8 +119,8 @@ ARG HTTP_PROXY
121119
ARG HTTPS_PROXY
122120
ARG NO_PROXY
123121

124-
RUN dnf install -y python fio python3-pip
125-
RUN python -m pip install grpcio grpcio-tools grpcio-reflection
122+
# hadolint ignore=DL3013
123+
RUN dnf install -y python fio python3-pip && dnf clean all && python -m pip install --no-cache-dir grpcio grpcio-tools grpcio-reflection
126124

127125
COPY core/host-target/init /init
128126
COPY core/host-target/*.py /
@@ -145,8 +143,8 @@ ARG HTTP_PROXY
145143
ARG HTTPS_PROXY
146144
ARG NO_PROXY
147145

148-
RUN dnf install -y python fio python3-pip
149-
RUN python -m pip install grpcio-reflection pyfakefs
146+
# hadolint ignore=DL3013
147+
RUN dnf install -y python fio python3-pip && dnf clean all && python -m pip install --no-cache-dir grpcio-reflection pyfakefs
150148

151149
COPY tests/ut/host-target /host-target/tests
152150
COPY --from=host-target fio_runner.py /host-target/src/

build/storage/tests/it/test-drivers/Dockerfile

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ FROM spdk-app AS test-driver
1010
ARG HTTP_PROXY
1111
ARG HTTPS_PROXY
1212
ARG NO_PROXY
13-
14-
RUN dnf install -y socat
15-
RUN dnf install -y grpc-cli
16-
RUN dnf install -y jq
13+
14+
RUN dnf install -y socat grpc-cli jq && dnf clean all
1715

1816
COPY tests/it/test-drivers/test-helpers /test-helpers
1917
COPY scripts/ /scripts

build/storage/tests/it/traffic-generator/Dockerfile

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ ENV no_proxy=$NO_PROXY
2020

2121
FROM base as traffic-generator-base
2222

23-
RUN dnf install -y wget
24-
RUN dnf install -y libguestfs-tools-c
23+
RUN dnf install -y wget && dnf install -y libguestfs-tools-c && dnf clean all
2524

2625
COPY scripts/vm/prepare_vm.sh /scripts/vm/prepare_vm.sh
2726
COPY scripts/run_host_target_container.sh /scripts/run_host_target_container.sh
@@ -31,7 +30,7 @@ RUN /scripts/vm/prepare_vm.sh
3130

3231
FROM base AS traffic-generator
3332

34-
RUN dnf install -y qemu-kvm
33+
RUN dnf install -y qemu-kvm && dnf clean all
3534
COPY tests/it/traffic-generator/init /init
3635
COPY --from=traffic-generator-base $DRIVE_TO_BOOT $DRIVE_TO_BOOT
3736
COPY /scripts /scripts

0 commit comments

Comments
 (0)