A housing lottery service image runs as root by default, and the platform requires non-root containers. What should the image build include?
Select an answer to reveal the explanation.
Short Explanation
Running as root in a container is like leaving the master key under the doormat. Create a non-root user in the image, chown what the app needs, and set USER so Kubernetes SecurityContext policies can happily refuse root.
Full Explanation
Application images should establish a non-root USER and correct file ownership so Pods can set runAsNonRoot and related SecurityContext fields without failing. Privileged mode, hostNetwork, or RBAC bindings do not replace building images that are ready to run unprivileged.