From a4dee6a591411eaebe402577c8c58afecf4e6edc Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Tue, 23 Nov 2021 08:24:56 -0500 Subject: [PATCH] packaging: delint tests dockerfiles Removed all errors/warnings pointed out by hadolint version 2.7.0, except for the following ignored rules: - "DL3008 warning: Pin versions in apt get install" - "DL3041 warning: Specify version with `dnf install -y -`" - "DL3033 warning: Specify version with `yum install -y -`" - "DL3048 style: Invalid label key" - "DL3003 warning: Use WORKDIR to switch to a directory" - "DL3018 warning: Pin versions in apk add. Instead of apk add use apk add =" - "DL3037 warning: Specify version with zypper install -y [=]" Fixes #3107 Signed-off-by: Wainer dos Santos Moschetta --- .../tests/Dockerfile/FedoraDockerfile.in | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tools/packaging/tests/Dockerfile/FedoraDockerfile.in b/tools/packaging/tests/Dockerfile/FedoraDockerfile.in index 4023f36aa2..e050ca971b 100644 --- a/tools/packaging/tests/Dockerfile/FedoraDockerfile.in +++ b/tools/packaging/tests/Dockerfile/FedoraDockerfile.in @@ -14,15 +14,14 @@ ENV GOPATH=/home/go ENV TESTS_REPOSITORY_PATH="${GOPATH}/src/${TESTS_REPO}" ENV AGENT_INIT=yes TEST_INITRD=yes OSBUILDER_DISTRO=alpine -# Install packages -RUN sudo dnf -y install kata-proxy kata-ksm-throttler kata-osbuilder kata-runtime kata-shim -RUN sudo mkdir "${GOPATH}" -RUN sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo -RUN sudo dnf makecache -RUN sudo dnf -y install docker-ce -RUN go get -d "${TESTS_REPO}" -RUN cd "${TESTS_REPOSITORY_PATH}" && .ci/install_kata_image.sh -RUN cd "${TESTS_REPOSITORY_PATH}" && .ci/install_kata_kernel.sh -RUN kata-runtime kata-env +# Install packages and build and install Kata Containers +RUN dnf -y install kata-proxy kata-ksm-throttler kata-osbuilder kata-runtime kata-shim && \ + mkdir "${GOPATH}" && \ + dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo && \ + dnf makecache && dnf -y install docker-ce && dnf clean all && \ + go get -d "${TESTS_REPO}" && \ + cd "${TESTS_REPOSITORY_PATH}" && .ci/install_kata_image.sh && \ + cd "${TESTS_REPOSITORY_PATH}" && .ci/install_kata_kernel.sh && \ + kata-runtime kata-env CMD ["/bin/bash"]