以 docker run --user $(whoami) nginx 运行容器,会出现下面的错误:
docker run --user $(whoami) nginx
docker: Error response from daemon: linux spec user: unable to find user xxxx: no matching entries in passwd file.
请问如何解决?
不能使用用户名,要使用uid
docker run --user $(id -u) nginx