实例化并运行postgres容器:
进入其中。
$ docker exec -it postgres su postgres正在退出...
postgres@3eb98e824f39:/$ psql响应
psql: FATAL: role "postgres" does not exist无法createuser,因为它给出了相同的响应。我认为PSQL是开箱即用的postgres用户。否则--你怎么引导呢?
在我的docker-compose.yaml上,我有一个postgres容器的卷图。但即使在I docker-up的时候让它从头开始,在这里也不起作用。
我如何打破‘你不能引导,因为你不能引导’的循环?
发布于 2019-03-06 06:36:05
我一定是受到了某种腐败的折磨。删除图像和容器并重新启动它们解决了问题。
发布于 2019-03-06 06:28:32
您应该检查您是如何运行Docker镜像的
>docker run --name postgres -d postgres:latest
>docker exec -ti postgres su postgres
postgres@71bcfb3be14e:/$ psql
psql (11.2 (Debian 11.2-1.pgdg90+1))
Type "help" for help.如果您运行的是特定版本,请检查documentation
https://stackoverflow.com/questions/55012382
复制相似问题