[英]Unable to find user root: no matching entries in passwd file in Docker
[英]unable to find user root: no matching entries in passwd file
我有一個正在運行的 Docker 容器,其中包含以下內容:
docker exec -it cc58908a8dc2 /bin/bash
我之前在其他容器上運行過這個命令,它工作得很好。 但是,現在我遇到了這個問題:
unable to find user root: no matching entries in passwd file
我的Dockerfile
有以下內容:
# We will be running our Spark jobs as `root` user.
USER root
# Working directory is set to the home folder of `root` user.
WORKDIR /root
知道什么可能導致這種情況嗎?
有時,重新啟動Docker容器后會出現該消息。
如果不是像這樣docker restart cc58908a8dc2
我停下來,像這樣啟動容器:
docker stop cc58908a8dc2
docker start cc58908a8dc2
然后錯誤消失了。
如果你想修復此問題,請記得發表評論https://forums.docker.com/t/unable-to-find-user-root-no-matching-entries-in-passwd-file/26545/9
還可以使用知識庫文章中的反饋按鈕 ,記錄如何在遇到Docker引擎時重新啟動它: https : //success.docker.com/article/ucp-health-checks-fail-unable-to-find-user-nobody-無匹配條目合的passwd文件-觀察
似乎互聯網已滿,其他人隨機遇到這個錯誤。
要了解您必須遇到的更改,請查看http://status.openstack.org/elastic-recheck/index.html#1803544 ,這是OpenStack CI作業中出現錯誤的圖表,每天都會發生。
我知道任何軟件都有錯誤並且需要時間來修復它們,但是這個錯誤讓我失去了......兩年多以來,Docker唯一的反饋就是“跟蹤器私有”和“重啟docker”。
重新啟動容器通常會有所幫助(請參閱 @octavian 答案)。 如果它不是一個選項,請嘗試:
docker exec -it -u 0 cc58908a8dc2 /bin/bash
其中cc58908a8dc2是您的容器的名稱
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.