以指定用户名执行 docker run 的问题

以 docker run --user $(whoami) nginx 运行容器,会出现下面的错误:

docker: Error response from daemon: linux spec user: unable to find user xxxx: no matching entries in passwd file.

请问如何解决?


BIG阳
浏览 5546回答 1
1回答

叮当猫咪

不能使用用户名,要使用uiddocker run --user $(id -u) nginx
打开App,查看更多内容
随时随地看视频慕课网APP