diff --git a/tools/osbuilder/dockerfiles/QAT/Dockerfile b/tools/osbuilder/dockerfiles/QAT/Dockerfile index 5b70ca5300..555c34596a 100644 --- a/tools/osbuilder/dockerfiles/QAT/Dockerfile +++ b/tools/osbuilder/dockerfiles/QAT/Dockerfile @@ -42,7 +42,8 @@ RUN dnf install -y \ systemd-devel \ sudo \ xz \ - yasm + yasm && \ + dnf clean all # Add in non-privileged user RUN useradd qatbuilder -p "" && \ diff --git a/tools/osbuilder/dracut/Dockerfile.in b/tools/osbuilder/dracut/Dockerfile.in index 49702d9e91..f84838bc3d 100644 --- a/tools/osbuilder/dracut/Dockerfile.in +++ b/tools/osbuilder/dracut/Dockerfile.in @@ -3,8 +3,13 @@ # # SPDX-License-Identifier: Apache-2.0 +# openSUSE Tumbleweed image has only 'latest' tag so ignore DL3006 rule. +# hadolint ignore=DL3006 from opensuse/tumbleweed +# zypper -y or --non-interactive can be used interchangeably here so ignore +# DL3034 rule. +# hadolint ignore=DL3034 RUN zypper --non-interactive refresh; \ zypper --non-interactive install --no-recommends --force-resolution \ autoconf \ diff --git a/tools/osbuilder/image-builder/Dockerfile b/tools/osbuilder/image-builder/Dockerfile index 2242807ea4..02f93475fd 100644 --- a/tools/osbuilder/image-builder/Dockerfile +++ b/tools/osbuilder/image-builder/Dockerfile @@ -5,6 +5,14 @@ ARG IMAGE_REGISTRY=registry.fedoraproject.org FROM ${IMAGE_REGISTRY}/fedora:34 -RUN [ -n "$http_proxy" ] && sed -i '$ a proxy='$http_proxy /etc/dnf/dnf.conf ; true - -RUN dnf install -y qemu-img parted gdisk e2fsprogs gcc xfsprogs findutils +RUN ([ -n "$http_proxy" ] && \ + sed -i '$ a proxy='$http_proxy /etc/dnf/dnf.conf ; true) && \ + dnf install -y \ + e2fsprogs \ + findutils \ + gcc \ + gdisk \ + parted \ + qemu-img \ + xfsprogs && \ + dnf clean all diff --git a/tools/osbuilder/rootfs-builder/centos/Dockerfile.in b/tools/osbuilder/rootfs-builder/centos/Dockerfile.in index 529bd7ba97..d05436e2a9 100644 --- a/tools/osbuilder/rootfs-builder/centos/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/centos/Dockerfile.in @@ -32,7 +32,8 @@ RUN yum -y update && yum install -y \ sed \ tar \ vim \ - which + which && \ + yum clean all # This will install the proper packages to build Kata components @INSTALL_MUSL@ diff --git a/tools/osbuilder/rootfs-builder/clearlinux/Dockerfile.in b/tools/osbuilder/rootfs-builder/clearlinux/Dockerfile.in index abbc413474..422a12747c 100644 --- a/tools/osbuilder/rootfs-builder/clearlinux/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/clearlinux/Dockerfile.in @@ -35,7 +35,8 @@ RUN dnf -y update && dnf install -y \ systemd \ tar \ vim \ - which + which && \ + dnf clean all # This will install the proper packages to build Kata components @INSTALL_MUSL@ diff --git a/tools/osbuilder/rootfs-builder/fedora/Dockerfile.in b/tools/osbuilder/rootfs-builder/fedora/Dockerfile.in index dac32f5050..e566823ea7 100644 --- a/tools/osbuilder/rootfs-builder/fedora/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/fedora/Dockerfile.in @@ -35,7 +35,8 @@ RUN dnf -y update && dnf install -y \ systemd \ tar \ vim \ - which + which && \ + dnf clean all # This will install the proper packages to build Kata components @INSTALL_MUSL@ diff --git a/tools/osbuilder/rootfs-builder/gentoo/Dockerfile.in b/tools/osbuilder/rootfs-builder/gentoo/Dockerfile.in index 8a06ff921f..e817d2ac83 100644 --- a/tools/osbuilder/rootfs-builder/gentoo/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/gentoo/Dockerfile.in @@ -4,6 +4,8 @@ # SPDX-License-Identifier: Apache-2.0 ARG IMAGE_REGISTRY=docker.io +# stage3-amd64 image has only 'latest' tag so ignore DL3006 rule. +# hadolint ignore=DL3007 FROM ${IMAGE_REGISTRY}/gentoo/stage3-amd64:latest # This dockerfile needs to provide all the componets need to build a rootfs diff --git a/tools/osbuilder/rootfs-builder/suse/Dockerfile.in b/tools/osbuilder/rootfs-builder/suse/Dockerfile.in index 70948a4b13..b86086a7df 100644 --- a/tools/osbuilder/rootfs-builder/suse/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/suse/Dockerfile.in @@ -6,7 +6,7 @@ ARG IMAGE_REGISTRY=docker.io #suse: docker image to be used to create a rootfs #@OS_VERSION@: Docker image version to build this dockerfile -FROM ${IMAGE_REGISTRY}/opensuse/leap +FROM ${IMAGE_REGISTRY}/opensuse/leap:15.0 # This dockerfile needs to provide all the componets need to build a rootfs # Install any package need to create a rootfs (package manager, extra tools) diff --git a/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile-aarch64.in b/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile-aarch64.in index cc0fed0190..bad7006458 100644 --- a/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile-aarch64.in +++ b/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile-aarch64.in @@ -35,7 +35,9 @@ RUN apt-get update && apt-get install -y \ sed \ systemd \ tar \ - vim + vim && \ + apt-get clean && rm -rf /var/lib/apt/lists/ + # This will install the proper packages to build Kata components @INSTALL_MUSL@ @INSTALL_RUST@