Skip to content

Commit

Permalink
build: create /etc/selinux/config in case it is missing
Browse files Browse the repository at this point in the history
Sometimes the Ceph container images seem to have a broken scriptlet
while installing/updating Ceph packages. It is relatively common for
them to fail when `/etc/selinux/config` does not exist. By ensuring the
file directory and file exist (even if empty), the package installation
or upgrades succeed.

Signed-off-by: Niels de Vos <[email protected]>
  • Loading branch information
nixpanic authored and mergify[bot] committed Dec 19, 2023
1 parent 49cf9ec commit 1f09ca2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deploy/cephcsi/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ 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 dnf -y update --nobest \
&& dnf -y install nfs-utils \
&& dnf clean all \
Expand Down
2 changes: 2 additions & 0 deletions scripts/Dockerfile.devel
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ 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 dnf -y install \
git \
make \
Expand Down
2 changes: 2 additions & 0 deletions scripts/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ ENV \

COPY build.env /

RUN mkdir /etc/selinux || true && touch /etc/selinux/config

RUN source /build.env \
&& \
( test -n "${GOARCH}" && exit 0; echo -e "\n\nMissing GOARCH argument for building image, install Golang or run: make containerized-test GOARCH=amd64\n\n"; exit 1 ) \
Expand Down

0 comments on commit 1f09ca2

Please sign in to comment.