Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 使用来自不同VM服务器的docker在不同VM服务器上连接Postgres服务器_Postgresql_Docker - Fatal编程技术网

Postgresql 使用来自不同VM服务器的docker在不同VM服务器上连接Postgres服务器

Postgresql 使用来自不同VM服务器的docker在不同VM服务器上连接Postgres服务器,postgresql,docker,Postgresql,Docker,我正在尝试从我的虚拟机服务器使用docker连接到另一个虚拟机服务器上的postgres服务器。但是我遇到了很多问题。谁能告诉我我的密码有什么问题吗 错误:绑定地址格式无效:需要端口:tcp://200.242.102.110 Docker-compose.yml version: '3' services: postgres: image: postf9dc9f9f4f4dgres container_name: ec5bebcf971

我正在尝试从我的虚拟机服务器使用docker连接到另一个虚拟机服务器上的postgres服务器。但是我遇到了很多问题。谁能告诉我我的密码有什么问题吗

错误:绑定地址格式无效:需要端口:tcp://200.242.102.110

Docker-compose.yml 
version: '3'
services:
    postgres:
            image: postf9dc9f9f4f4dgres
            container_name: ec5bebcf9719
            env_file:
              - my-env-file
            ports:
             - "5432:5432"
    web:
        build: .
        command: python ./xx.py      
        depends_on:
            - postgres

dockerfile
FROM python:3
WORKDIR /home/ubuntu/xx 
COPY requirements.txt ./
RUN pip install -r requirements.txt
COPY . .
EXPOSE 80
EXPOSE 5432
CMD ["python", "./xx.py"]