From 0ab2411c78f7bb4d2daebbf3fc1f270af3776578 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Thu, 29 Aug 2024 16:07:52 +0200 Subject: [PATCH] forgot to add generated to-nonroot --- to-nonroot/curl-yq/Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 to-nonroot/curl-yq/Dockerfile diff --git a/to-nonroot/curl-yq/Dockerfile b/to-nonroot/curl-yq/Dockerfile new file mode 100644 index 0000000..029fa7e --- /dev/null +++ b/to-nonroot/curl-yq/Dockerfile @@ -0,0 +1,8 @@ +FROM --platform=$TARGETPLATFORM yolean/curl-yq:root + +# Appends the same nonroot directives as https://github.com/Yolean/kubernetes-kafka/tree/master/nonroot +# i.e. https://github.com/solsson/dockerfiles/tree/native/kafka-nonroot +RUN grep 'nonroot:x:65532' /etc/passwd || \ + echo 'nonroot:x:65532:65534:nonroot:/home/nonroot:/usr/sbin/nologin' >> /etc/passwd && \ + mkdir -p /home/nonroot && touch /home/nonroot/.bash_history && chown -R 65532:65534 /home/nonroot +USER nonroot:nogroup