You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When developing helm chart, to follow best practices I'd like to set a securityContext of runAsNonRoot: true
Unfortunately, when the k8s deployment creates a pod, the following error is seen in pod details:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 13s default-scheduler Successfully assigned default/terrahook-7b8fd679ff-jsk5k to aks-agentpool-30212186-vmss000002
Normal Pulling 13s kubelet Pulling image "alpine/git"
Normal Pulled 12s kubelet Successfully pulled image "alpine/git"
Normal Created 12s kubelet Created container git-cloner
Normal Started 12s kubelet Started container git-cloner
Normal Pulled 9s (x2 over 10s) kubelet Container image "accurics/terrascan:1.5.0" already present on machine
Warning Failed 9s (x2 over 10s) kubelet Error: container has runAsNonRoot and image has non-numeric user (terrascan), cannot verify user is non-root
So looks like we need to change the Dockerfile to read
USER 101
The text was updated successfully, but these errors were encountered:
Description
When developing helm chart, to follow best practices I'd like to set a securityContext of
runAsNonRoot: true
Unfortunately, when the k8s deployment creates a pod, the following error is seen in pod details:
So looks like we need to change the Dockerfile to read
The text was updated successfully, but these errors were encountered: