From 1c93d9e4a61cf1c64b195c33c56e6144c613b53c Mon Sep 17 00:00:00 2001 From: Ali Afsharzadeh Date: Mon, 2 Dec 2024 15:32:15 +0330 Subject: [PATCH] build: refactor dockerfile to simplify selinux config directory creation Signed-off-by: Ali Afsharzadeh --- deploy/cephcsi/image/Dockerfile | 2 +- scripts/Dockerfile.devel | 2 +- scripts/Dockerfile.test | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/cephcsi/image/Dockerfile b/deploy/cephcsi/image/Dockerfile index dc717cd78ab..a3f223644bd 100644 --- a/deploy/cephcsi/image/Dockerfile +++ b/deploy/cephcsi/image/Dockerfile @@ -10,7 +10,7 @@ FROM ${BASE_IMAGE} as updated_base RUN dnf config-manager --disable \ tcmu-runner,tcmu-runner-source,tcmu-runner-noarch,ceph-iscsi,ganesha || true -RUN mkdir /etc/selinux || true && touch /etc/selinux/config +RUN mkdir -p /etc/selinux && touch /etc/selinux/config RUN dnf -y update --nobest \ && dnf -y install nfs-utils \ diff --git a/scripts/Dockerfile.devel b/scripts/Dockerfile.devel index efd552488de..a5fe222a816 100644 --- a/scripts/Dockerfile.devel +++ b/scripts/Dockerfile.devel @@ -23,7 +23,7 @@ RUN source /build.env \ RUN dnf config-manager --disable \ tcmu-runner,tcmu-runner-source,tcmu-runner-noarch,ceph-iscsi,ganesha || true -RUN mkdir /etc/selinux || true && touch /etc/selinux/config +RUN mkdir -p /etc/selinux && touch /etc/selinux/config # other/conflicting versions of protobuf get installed as dependency RUN dnf -y remove protobuf diff --git a/scripts/Dockerfile.test b/scripts/Dockerfile.test index a05d7737e08..def6a3325eb 100644 --- a/scripts/Dockerfile.test +++ b/scripts/Dockerfile.test @@ -23,7 +23,7 @@ ENV \ COPY build.env / -RUN mkdir /etc/selinux || true && touch /etc/selinux/config +RUN mkdir -p /etc/selinux && touch /etc/selinux/config RUN source /build.env \ && \