Skip to content

Commit 0a8b653

Browse files
vdemeestertekton-robot
authored andcommitted
Add securityContext to run as root for kaniko task 🤖
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 <[email protected]>
1 parent 608f6fd commit 0a8b653

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kaniko/kaniko.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ spec:
3737
- --dockerfile=$(inputs.params.DOCKERFILE)
3838
- --context=/workspace/source/$(inputs.params.CONTEXT) # The user does not need to care the workspace and the source.
3939
- --destination=$(outputs.resources.image.url)
40+
securityContext:
41+
runAsUser: 0

0 commit comments

Comments
 (0)