diff --git a/.dockerignore b/.dockerignore index 470716fef5b..ebcc18006db 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,6 @@ ** !api !selinux -!policy.33 -!file_contexts !cmd !docs !hack diff --git a/Dockerfile b/Dockerfile index ed6966e8001..11085151b3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -614,11 +614,16 @@ EOF FROM scratch AS modules-arm64 COPY --from=depmod-arm64 /build/lib/modules /lib/modules +FROM tools as selinux +COPY ./selinux /selinux +RUN secilc -c 33 /selinux/**/*.cil -vvvvv +RUN mkdir -p /rootfs/selinux +RUN mkdir -p /rootfs/etc/selinux/talos +RUN cp /policy.33 /rootfs/etc/selinux/talos/ + # The rootfs target provides the Talos rootfs. FROM build AS rootfs-base-amd64 COPY --link --from=pkg-fhs / /rootfs -RUN mkdir /rootfs/selinux -RUN mkdir -p /rootfs/etc/selinux/talos COPY --link --from=pkg-ca-certificates / /rootfs COPY --link --from=pkg-apparmor-amd64 / /rootfs COPY --link --from=pkg-cni-stripped-amd64 / /rootfs @@ -687,14 +692,10 @@ RUN <