由于应用程序,无法执行docker容器

昨天我重新启动我的数据库泊坞窗容器。 但是我的应用程序仍然可以正常连接:

以下行不再起作用

docker exec -i -t database_1 bash 

相反,它给了我这个错误:

 unable to find user postgres: no matching entries in passwd file 

我不知道为什么它不只是给我bash

看起来好像你切换到Dockerfile中的其他用户,但从来没有创build它。 尝试这个:

 docker exec -it --user root database_1 /bin/bash 

这是Docker中的一些错误。 显然, docker stop <container>; docker start <container> docker stop <container>; docker start <container>将修复它,并使用docker cp可以导致它发生。