initdb: error: The program “postgres“ is needed by initdb but was no
PG启动报错# docker logs postgres
popen failure: Cannot allocate memory
initdb: error: The program “postgres” is needed by initdb but was not found in the
same directory as “/usr/lib/postgresql/12/bin/initdb”.
Check your installation.
https://img-blog.csdnimg.cn/direct/b2b94a54bc8a4aed9a123f3480185db8.png
但是换个镜像就没题目,应该是镜像跟体系不匹配吧,发起换镜像吧
docker pull postgres:bullseye
拉取镜像
docker pull postgres:12.17-bullseye
启动镜像
docker run --name postgres1217 -e POSTGRES_PASSWORD=PGdata@456-p 5432:5432 -v /data/postgres/postgresql/data:/var/lib/postgresql/data -d postgres:12.17-bullseye
查看容器状态
docker ps -a
开放端口
firewall-cmd --add-port=5432/tcp
firewall-cmd --add-port=5432/tcp --permanent
链接测试
https://img-blog.csdnimg.cn/direct/8873579a11cf46948a0a196696dab430.png
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]