Image runs fine as root but fails as non-root (`EACCES` creating `/app/.cache` or `/.npm`).
BeginnerTroubleshootingSecurity, rootless, Podman and containerd
Answer
Likely causes → Home/cache directories not writable by the non-root UID; no passwd entry for arbitrary UIDs.
Diagnose → docker run --user 10001 --rm image sh -c 'id; echo $HOME; touch $HOME/x'.
Fix → chown dirs at build, set HOME=/tmp or a writable path, npm_config_cache=/tmp/.npm.
Prevent → Test with the production user and read-only FS.
More on Security, rootless, Podman and containerd
Rootless Docker: `dockerd-rootless.sh` fails with `newuidmap: write to uid_map failed: Operation not permitted`IntermediateRootless: `rootlesskit: failed to ... listen tcp 0.0.0.0:80: bind: permission denied`BeginnerRootless Docker stops when you log out of SSH.BeginnerRootless containers: `Error: ... cannot set up namespace using "/usr/bin/newuidmap": should have setuid or have filecaps setuid` (Podman).IntermediatePodman: `Error: short-name "nginx" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf"`BeginnerPodman rootless: `Error: cannot find newuidmap` / ping fails inside container: `ping: permission denied (are you root?)`.Intermediate