猿问

以指定用户名执行 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阳
浏览 5555回答 1
1回答

叮当猫咪

不能使用用户名,要使用uiddocker run --user $(id -u) nginx
随时随地看视频慕课网APP
我要回答