From 0261bf6591a37ca84fee59df4255b0ff927f9071 Mon Sep 17 00:00:00 2001 From: Ivan Teterevkov Date: Tue, 10 Oct 2023 19:37:17 +0100 Subject: [PATCH] ON-14865: Fix RunAsNonRoot preflight check Set the controller and Device Plugin user to 1001. Reported-by: Peter Colledge --- Dockerfile | 2 +- deviceplugin.Dockerfile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cd09186..35211cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,6 +33,6 @@ FROM registry.access.redhat.com/ubi8/ubi-micro:8.8 WORKDIR / COPY --from=builder /workspace/manager . COPY --from=builder /workspace/LICENSE /licenses/LICENSE -USER 65532:65532 +USER 1001 ENTRYPOINT ["/manager"] diff --git a/deviceplugin.Dockerfile b/deviceplugin.Dockerfile index 3d76e90..d526cee 100644 --- a/deviceplugin.Dockerfile +++ b/deviceplugin.Dockerfile @@ -25,4 +25,6 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8 RUN microdnf install -y lshw-B.02.19.2 && microdnf clean all COPY --from=builder /app/bin/onload-device-plugin /app/bin/onload-worker /usr/bin/ COPY --from=builder /app/LICENSE /licenses/LICENSE +USER 1001 + CMD ["/usr/bin/onload-device-plugin"]