odoo docker 运行 显示“'postInstallation':无法连接到 postgresql:5432”

odoo docker run show " 'postInstallation': Failed to connect to postgresql:5432"

我尝试从 docker hub 下载最后一个 odoo 图像,然后 运行 它并获取消息:
postgre INFO Trying to connect to PostgreSQL server Error executing 'postInstallation': Failed to connect to postgresql:5432 after N tries

我的日志:

root@test:~# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
bitnami/odoo        latest              8f069490b455        25 hours ago        1.27GB
hello-world         latest              bf756fb1ae65        9 months ago        13.3kB
root@test:~# docker run bitnami/odoo

Welcome to the Bitnami odoo container
Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-odoo
Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-odoo/issues

nami    INFO  Initializing odoo
odoo    INFO  Configuring Odoo database...
postgre INFO  Trying to connect to PostgreSQL server
Error executing 'postInstallation': Failed to connect to postgresql:5432 after 36 tries


更新:

我尝试检查端口状态,它看起来适用于 pgsql,但 odoo 仍然无法正常工作

root@test:~# cat /etc/services
postgresql  5432/tcp    postgres    # PostgreSQL Database

我认为错误很明显;除了“odoo”之外,您还需要一个“PostgreSQL 服务器”。请参阅 its docker hub page 了解更多信息。