File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,5 +68,6 @@ LABEL io.artifacthub.package.readme-url="%SOURCEURL_WITH(README.md)%"
6868LABEL io.artifacthub.package.logo-url="https://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.png"
6969ENTRYPOINT ["kubectl" ]
7070
71- RUN set -euo pipefail; echo "user:x:999:100:User for CLI:/home/user:/usr/sbin/nologin" >> /etc/passwd && install -d -o 999 -g 100 -m 0755 /home/user
71+ RUN set -euo pipefail; echo "user:x:999:100:User for CLI:/home/user:/usr/sbin/nologin" >> /etc/passwd && install -d -o 999 -g 100 -m 0755 /home/user /home/user/.kube
72+
7273WORKDIR /home/user
Original file line number Diff line number Diff line change @@ -30,7 +30,18 @@ podman run --rm --name kubectl \
3030 -v /localpath/to/customize:/home/user:Z
3131 registry.suse.com/suse/kubectl:1.33 kustomize --enable-helm
3232```
33+ ## Running as a non-root user
3334
35+ By default, this container runs as the ` root ` user. However, it is prepared to run as a non-privileged user (UID ` 999 ` ) for enhanced security.
36+
37+ To run the container in rootless mode, you must explicitly set the user and the home environment variables:
38+
39+ ``` ShellSession
40+ podman run --rm --name kubectl \
41+ --user 999:100 \
42+ -e HOME=/home/user \
43+ -v /localpath/to/kubeconfig:/home/user/.kube/config:Z \
44+ registry.suse.com/suse/kubectl:1.33 get nodes
3445
3546## Licensing
3647
Original file line number Diff line number Diff line change @@ -69,5 +69,6 @@ LABEL io.artifacthub.package.readme-url="%SOURCEURL_WITH(README.md)%"
6969LABEL io.artifacthub.package.logo-url="https://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.png"
7070ENTRYPOINT ["kubectl" ]
7171
72- RUN set -euo pipefail; echo "user:x:999:100:User for CLI:/home/user:/usr/sbin/nologin" >> /etc/passwd && install -d -o 999 -g 100 -m 0755 /home/user
72+ RUN set -euo pipefail; echo "user:x:999:100:User for CLI:/home/user:/usr/sbin/nologin" >> /etc/passwd && install -d -o 999 -g 100 -m 0755 /home/user /home/user/.kube
73+
7374WORKDIR /home/user
Original file line number Diff line number Diff line change @@ -30,7 +30,18 @@ podman run --rm --name kubectl \
3030 -v /localpath/to/customize:/home/user:Z
3131 registry.suse.com/suse/kubectl:1.35 kustomize --enable-helm
3232```
33+ ## Running as a non-root user
3334
35+ By default, this container runs as the ` root ` user. However, it is prepared to run as a non-privileged user (UID ` 999 ` ) for enhanced security.
36+
37+ To run the container in rootless mode, you must explicitly set the user and the home environment variables:
38+
39+ ``` ShellSession
40+ podman run --rm --name kubectl \
41+ --user 999:100 \
42+ -e HOME=/home/user \
43+ -v /localpath/to/kubeconfig:/home/user/.kube/config:Z \
44+ registry.suse.com/suse/kubectl:1.35 get nodes
3445
3546## Licensing
3647
Original file line number Diff line number Diff line change 1919# !BuildTag: suse/pcp:6.2.0
2020# !BuildTag: suse/pcp:6.2
2121# !BuildTag: suse/pcp:6
22- # !BuildTag: suse/pcp:latest
23- # !BuildName: suse-pcp-6.2.0
22+ # !BuildName: suse-pcp
2423# !BuildVersion: 15.7.6.2.0
2524# !BuildRelease: 60
2625FROM bci/bci-init:15.7
You can’t perform that action at this time.
0 commit comments