Skip to content

Commit 6522a26

Browse files
vdemeestertekton-robot
authored andcommittedNov 12, 2019
Add securityContext to run as root for kaniko example 🤖
As of today, kaniko assumes it is running as root, which means, this example fails on platform that default to run containers as random uid (like OpenShift). Adding this securityContext make it explicit that it needs to run as root. Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
1 parent b174019 commit 6522a26

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎examples/taskruns/build-push-kaniko.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ spec:
5555
- --destination=$(outputs.resources.builtImage.url)
5656
- --context=$(inputs.params.pathToContext)
5757
- --oci-layout-path=$(inputs.resources.builtImage.path)
58+
securityContext:
59+
runAsUser: 0
5860
sidecars:
5961
- image: registry
6062
name: registry

0 commit comments

Comments
 (0)