小编Edo*_*ard的帖子

在 EC2 上使用 docker-compose up 对用户“postgres”进行密码身份验证失败

在由 docker-machine 创建的 EC2 linux 服务器上,当我通过docker-compose up启动 docker postgres:10.6,出现以下循环错误:

FATAL:  password authentication failed for user "postgres"
DETAIL:  Password does not match for user "postgres".
Connection matched pg_hba.conf line 95: "host all all all md5"
Run Code Online (Sandbox Code Playgroud)

如果我手动启动容器,我就不会出现这些错误 => docker run -e POSTGRES_PASSWORD=myPassword postgres:10.6

我的本地 docker 中没有这些错误。

我的 docker-compose :

FATAL:  password authentication failed for user "postgres"
DETAIL:  Password does not match for user "postgres".
Connection matched pg_hba.conf line 95: "host all all all md5"
Run Code Online (Sandbox Code Playgroud)

有谁知道如何解决这一问题?

postgresql amazon-ec2 docker docker-compose docker-machine

5
推荐指数
1
解决办法
1万
查看次数