Я новичок в docker и postgres. я настроил сервисные контейнеры postgres и pgadmin4 и хочу создать новый сервер в pgadmin. я получаю IP-адрес контейнера postgres по инструкции inspect как 172.18.0.2
мой postgres результат проверки выглядит следующим образом:
[
{
"Id": "8a898f76c4ed5bc9e003c5d0be8ab67f7f7045fe1cc4c1cb82cc263136360c0a",
"Created": "2020-02-11T22:54:11.018152083Z",
"Path": "docker-entrypoint.sh",
"Args": [
"postgres"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 4078,
"ExitCode": 0,
"Error": "",
"StartedAt": "2020-02-27T07:53:43.570077899Z",
"FinishedAt": "2020-02-27T07:35:12.205132013Z"
},
"Image": "sha256:b43856647ab572f271decd1f8de88b590e157bfd816599362fe162e8f37fb1ec",
"ResolvConfPath": "/var/lib/docker/containers/8a898f76c4ed5bc9e003c5d0be8ab67f7f7045fe1cc4c1cb82cc263136360c0a/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/8a898f76c4ed5bc9e003c5d0be8ab67f7f7045fe1cc4c1cb82cc263136360c0a/hostname",
"HostsPath": "/var/lib/docker/containers/8a898f76c4ed5bc9e003c5d0be8ab67f7f7045fe1cc4c1cb82cc263136360c0a/hosts",
"LogPath": "/var/lib/docker/containers/8a898f76c4ed5bc9e003c5d0be8ab67f7f7045fe1cc4c1cb82cc263136360c0a/8a898f76c4ed5bc9e003c5d0be8ab67f7f7045fe1cc4c1cb82cc263136360c0a-json.log",
"Name": "/google-ad-words-postgres",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/host_mnt/c/wamp64/www/google-ad-words:/application:rw"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "google-ad-words_default",
"PortBindings": {
"5432/tcp": [
{
"HostIp": "",
"HostPort": "8084"
}
]
},
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": [],
"CapAdd": null,
"CapDrop": null,
"Capabilities": null,
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "shareable",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/579907e185eaf689fe2fa0e75c7ccd207fd05f85154bda4887c836d60062c276-init/diff:/var/lib/docker/overlay2/0f235c1ebc1aad578ab2998c9727c8002c883e83f6076b325b69b16ed31f35eb/diff:/var/lib/docker/overlay2/3eab87840cf262453f6fa744c4ae61b77a26e75fcd48f4388f36120a70a680e7/diff:/var/lib/docker/overlay2/22e70ec746122772356fe213b9149f063c4eb97a5185c7dee8cb7c1ca1648086/diff:/var/lib/docker/overlay2/2fa1dbd50eba44c7e7c3c3c79c65467f0c754927750d691cd32253c048baf840/diff:/var/lib/docker/overlay2/5588b603da1c7139c0ff79edd158fa2579166156849c85457ce1ef9542d6be0f/diff:/var/lib/docker/overlay2/a3c4096b7b08d323bad09f959b23c7ed96764fc90569528ba0774b9ce63d0013/diff:/var/lib/docker/overlay2/800f19b5767d6598088c8ac4d64e6bab0421226665db0e505e3500563284d668/diff:/var/lib/docker/overlay2/67e3730eeaeac3411e5d54eb6cd34c6e5fa486138d0e0d9e1bf135336ef7ccc6/diff:/var/lib/docker/overlay2/0b092310839803394dd4a830ae2143930d47f8e86173cb46bd4a3e29f4ec87cb/diff",
"MergedDir": "/var/lib/docker/overlay2/579907e185eaf689fe2fa0e75c7ccd207fd05f85154bda4887c836d60062c276/merged",
"UpperDir": "/var/lib/docker/overlay2/579907e185eaf689fe2fa0e75c7ccd207fd05f85154bda4887c836d60062c276/diff",
"WorkDir": "/var/lib/docker/overlay2/579907e185eaf689fe2fa0e75c7ccd207fd05f85154bda4887c836d60062c276/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/host_mnt/c/wamp64/www/google-ad-words",
"Destination": "/application",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "volume",
"Name": "3b62664927156c94ba1f570c4082246755f1b66f6f4dd3ea6e00e7f84099bee9",
"Source": "/var/lib/docker/volumes/3b62664927156c94ba1f570c4082246755f1b66f6f4dd3ea6e00e7f84099bee9/_data",
"Destination": "/var/lib/postgresql/data",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "8a898f76c4ed",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"5432/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"POSTGRES_USER=root",
"POSTGRES_PASSWORD=toor",
"POSTGRES_DB=core-db",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=en_US.utf8",
"PG_MAJOR=11",
"PG_VERSION=11.1",
"PG_SHA256=90815e812874831e9a4bf6e1136bf73bc2c5a0464ef142e2dfea40cda206db08",
"PGDATA=/var/lib/postgresql/data"
],
"Cmd": [
"postgres"
],
"Image": "postgres:11.1-alpine",
"Volumes": {
"/application": {},
"/var/lib/postgresql/data": {}
},
"WorkingDir": "/application",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {
"com.docker.compose.config-hash": "b42b467fdb058676db6aac2de623ca4dc24d602d25bdbe5538f03270d1394dda",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "google-ad-words",
"com.docker.compose.project.config_files": "docker-compose.yml",
"com.docker.compose.project.working_dir": "C:\\wamp64\\www\\google-ad-words",
"com.docker.compose.service": "postgres",
"com.docker.compose.version": "1.25.4"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "b6e5d1edca6b3dd27ca26fa038747fb08926dec8b9a8594d1d6160998f1caaa0",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"5432/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "8084"
}
]
},
"SandboxKey": "/var/run/docker/netns/b6e5d1edca6b",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"google-ad-words_default": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"postgres",
"8a898f76c4ed"
],
"NetworkID": "340ce7b63f7790542cd04ec8ff7f55cd5847f38d113f6e444e369919e6fc44fb",
"EndpointID": "bc62ec297e23d83ae468fe76d2ca12647c594521f445d6d5a2fbed658481fa1a",
"Gateway": "172.18.0.1",
"IPAddress": "172.18.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:12:00:02",
"DriverOpts": null
}
}
}
}
]
, когда я хочу добавить сервер из Пгадмин, я получил следующую ошибку. ошибка истечения времени ожидания . как я могу решить это? спасибо ...