Skip to content

Commit

Permalink
forgot to add generated to-nonroot
Browse files Browse the repository at this point in the history
  • Loading branch information
solsson committed Aug 29, 2024
1 parent 4515a6e commit 0ab2411
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions to-nonroot/curl-yq/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0ab2411

Please sign in to comment.