Search Postgresql Archives

solution: Re: pgadmin4: not possible to create server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adrian


So you pgAdmin4 running in a container on your local machine and Postgres running in the native OS(the OS is?) on your local machine. Is the Docker container set up to 'see' the local machine?

what do you mean by see?

For fuller explanation see:

https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach

your hint pointed in the right direction:
it is not localhost, on which the server is running, because localhost is relative to the container, so it is in effect the container itself.
Postgres is running on the gatway of the containers network.
This I found out by issuing:
docker inspect reverent_volhard (where reverent_volhard is the containers name in which pgadmin4 runs)
this providest:
...
          "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "df33249ff65c37ea1ca1f142b4a74283c4429c44c3ed1eb5ea80c695c87ab86d",                     "EndpointID": "905c0c78145ef1847854f221200d8e4a7788f99b901030460111258ab9156b29",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:02",
                    "DriverOpts": null
                }

so postgres runs on 172.17.0.1

and bingo, it works

thanks again
robert




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux