-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Docker compose hangs forever on starting containers #10707
Comments
I tried to reproduce with simplified config: services:
reverse-proxy:
image: nginx
depends_on:
flyway:
condition: service_completed_successfully
flyway:
image: alpine
command: /bin/false and get the desired behavior:
|
please use |
it appears that it stucks when container name is provided, i took you example, added to it container name and it's stuck
nginxdocker inspect a30779cd8b51 ```json [ { "Id": "a30779cd8b51b5f8ae22ac17cc85808cf15fa7aa9a0b2288257c5b0763a9a9bb", "Created": "2023-06-14T19:59:31.268302934Z", "Path": "/docker-entrypoint.sh", "Args": [ "nginx", "-g", "daemon off;" ], "State": { "Status": "created", "Running": false, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 0, "ExitCode": 0, "Error": "", "StartedAt": "0001-01-01T00:00:00Z", "FinishedAt": "0001-01-01T00:00:00Z" }, "Image": "sha256:7d3c40f240e18f6b440bf06b1dfd8a9c48a49c1dfe3400772c3b378739cbdc47", "ResolvConfPath": "", "HostnamePath": "", "HostsPath": "", "LogPath": "", "Name": "/installer-reverse-proxy-1", "RestartCount": 0, "Driver": "overlay2", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": null, "HostConfig": { "Binds": null, "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "installer_default", "PortBindings": {}, "RestartPolicy": { "Name": "", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "ConsoleSize": [ 0, 0 ], "CapAdd": null, "CapDrop": null, "CgroupnsMode": "private", "Dns": null, "DnsOptions": null, "DnsSearch": null, "ExtraHosts": [], "GroupAdd": null, "IpcMode": "private", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "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, "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/1edf0cf6f7f8feaf4ba11e449bf627ce75b14e07602c80d57538abd7f810242e-init/diff:/var/lib/docker/overlay2/ddbc0fa8dd9d2f152e384ef159e2c80c9fbacbb76cd389810ef6fffba07bb8cd/diff:/var/lib/docker/overlay2/ea93afdc8e014ecdb269f88cb49c880cd85d8c2cc785a750ecefe14fb223be97/diff:/var/lib/docker/overlay2/425b176ae69d66691b25e241185188a727eaaeaa6b45dc3898d59c592713e90c/diff:/var/lib/docker/overlay2/804763b6415b9f155802e9c8bac8941770beea1aac9114bf7cc535e468a8fc78/diff:/var/lib/docker/overlay2/4f566e7c70c4bec33c0366ae10fee23f98910f07a3e5bbd17631c546f9f37c22/diff:/var/lib/docker/overlay2/6400bd3e20ee357bbec44e66b10c3ca3f93469ba10787c85451326ab4f638cbe/diff", "MergedDir": "/var/lib/docker/overlay2/1edf0cf6f7f8feaf4ba11e449bf627ce75b14e07602c80d57538abd7f810242e/merged", "UpperDir": "/var/lib/docker/overlay2/1edf0cf6f7f8feaf4ba11e449bf627ce75b14e07602c80d57538abd7f810242e/diff", "WorkDir": "/var/lib/docker/overlay2/1edf0cf6f7f8feaf4ba11e449bf627ce75b14e07602c80d57538abd7f810242e/work" }, "Name": "overlay2" }, "Mounts": [], "Config": { "Hostname": "a30779cd8b51", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "ExposedPorts": { "80/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "NGINX_VERSION=1.25.0", "NJS_VERSION=0.7.12", "PKG_RELEASE=1~bullseye" ], "Cmd": [ "nginx", "-g", "daemon off;" ], "Image": "nginx", "Volumes": null, "WorkingDir": "", "Entrypoint": [ "/docker-entrypoint.sh" ], "OnBuild": null, "Labels": { "com.docker.compose.config-hash": "3184b9cabf1bdd58a1be1fee461747ad21bb6f1e2274488b9ec60e386018bbef", "com.docker.compose.container-number": "1", "com.docker.compose.depends_on": "flyway:service_completed_successfully:false", "com.docker.compose.image": "sha256:7d3c40f240e18f6b440bf06b1dfd8a9c48a49c1dfe3400772c3b378739cbdc47", "com.docker.compose.oneoff": "False", "com.docker.compose.project": "installer", "com.docker.compose.project.config_files": "/home/docker-compose.yml", "com.docker.compose.project.working_dir": "/home", "com.docker.compose.replace": "8618f8e678205d9d77404827c84febfeb5fcb61a8912559359782b7ce35bf6f4", "com.docker.compose.service": "reverse-proxy", "com.docker.compose.version": "2.18.1", "maintainer": "NGINX Docker Maintainers " }, "StopSignal": "SIGQUIT" }, "NetworkSettings": { "Bridge": "", "SandboxID": "", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": {}, "SandboxKey": "", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "installer_default": { "IPAMConfig": null, "Links": null, "Aliases": [ "installer-reverse-proxy-1", "reverse-proxy", "a30779cd8b51" ], "NetworkID": "", "EndpointID": "", "Gateway": "", "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "", "DriverOpts": null } } } } ] ```alpinedocker inspect a30779cd8b51 ```json [ { "Id": "c1ed3af1cc72a8201422747df5b84ca20d68b313cfd682a7534c88fb14511103", "Created": "2023-06-14T20:00:27.528884739Z", "Path": "/bin/sh", "Args": [], "State": { "Status": "created", "Running": false, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 0, "ExitCode": 0, "Error": "", "StartedAt": "0001-01-01T00:00:00Z", "FinishedAt": "0001-01-01T00:00:00Z" }, "Image": "sha256:5e2b554c1c45d22c9d1aa836828828e320a26011b76c08631ac896cbc3625e3e", "ResolvConfPath": "", "HostnamePath": "", "HostsPath": "", "LogPath": "", "Name": "/0f949fda97d5_flyway", "RestartCount": 0, "Driver": "overlay2", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": null, "HostConfig": { "Binds": null, "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "installer_default", "PortBindings": {}, "RestartPolicy": { "Name": "", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "ConsoleSize": [ 0, 0 ], "CapAdd": null, "CapDrop": null, "CgroupnsMode": "private", "Dns": null, "DnsOptions": null, "DnsSearch": null, "ExtraHosts": [], "GroupAdd": null, "IpcMode": "private", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "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, "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/3d460e3e45f53741082317a535cc52673de66ecec99a7b59c1dd8343e79a6bc6-init/diff:/var/lib/docker/overlay2/06f46ea36dcc9f24acceff2392c7f1525ca9aa13a8adc6dbaa52ed0ba9890f57/diff", "MergedDir": "/var/lib/docker/overlay2/3d460e3e45f53741082317a535cc52673de66ecec99a7b59c1dd8343e79a6bc6/merged", "UpperDir": "/var/lib/docker/overlay2/3d460e3e45f53741082317a535cc52673de66ecec99a7b59c1dd8343e79a6bc6/diff", "WorkDir": "/var/lib/docker/overlay2/3d460e3e45f53741082317a535cc52673de66ecec99a7b59c1dd8343e79a6bc6/work" }, "Name": "overlay2" }, "Mounts": [], "Config": { "Hostname": "c1ed3af1cc72", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": [ "/bin/sh" ], "Image": "alpine", "Volumes": null, "WorkingDir": "", "Entrypoint": null, "OnBuild": null, "Labels": { "com.docker.compose.config-hash": "036379e87c289a9a89e732f484b335dbeeb0785aca33fc9d5a09e7cc2905c811", "com.docker.compose.container-number": "1", "com.docker.compose.depends_on": "", "com.docker.compose.image": "sha256:5e2b554c1c45d22c9d1aa836828828e320a26011b76c08631ac896cbc3625e3e", "com.docker.compose.oneoff": "False", "com.docker.compose.project": "installer", "com.docker.compose.project.config_files": "/home/docker-compose.yml", "com.docker.compose.project.working_dir": "/home/installer", "com.docker.compose.replace": "0f949fda97d5f67ec68c7d39b8ff13957026f620b89cba7bc9e3c2c0e2594bb0", "com.docker.compose.service": "flyway", "com.docker.compose.version": "2.18.1" } }, "NetworkSettings": { "Bridge": "", "SandboxID": "", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": {}, "SandboxKey": "", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "installer_default": { "IPAMConfig": null, "Links": null, "Aliases": [ "flyway", "flyway", "c1ed3af1cc72" ], "NetworkID": "", "EndpointID": "", "Gateway": "", "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "", "DriverOpts": null } } } } ] ``` |
Tried with
There alpine container you inspected "0f949fda97d5_flyway" is not the one which exited. Seems you have some orphaned container, which might explain compose get confused here. could you check with |
Hi, you are right my examples started to work after removing dangling containers.
docker inspect nginx1``` [ { "Id": "229e1d9a6467708ba02053abb6f1f9d805c30fb65ce4b7b4bc46ad83e0a6001f", "Created": "2023-06-16T21:53:58.874255167Z", "Path": "/docker-entrypoint.sh", "Args": [ "nginx", "-g", "daemon off;" ], "State": { "Status": "created", "Running": false, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 0, "ExitCode": 0, "Error": "", "StartedAt": "0001-01-01T00:00:00Z", "FinishedAt": "0001-01-01T00:00:00Z" }, "Image": "sha256:7d3c40f240e18f6b440bf06b1dfd8a9c48a49c1dfe3400772c3b378739cbdc47", "ResolvConfPath": "", "HostnamePath": "", "HostsPath": "", "LogPath": "", "Name": "/nginx1", "RestartCount": 0, "Driver": "overlay2", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": null, "HostConfig": { "Binds": null, "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "installer_default", "PortBindings": {}, "RestartPolicy": { "Name": "always", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "ConsoleSize": [ 0, 0 ], "CapAdd": null, "CapDrop": null, "CgroupnsMode": "private", "Dns": null, "DnsOptions": null, "DnsSearch": null, "ExtraHosts": [], "GroupAdd": null, "IpcMode": "private", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "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, "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/83dc5148f3272b35de51130bac5147e69c622cee5df1faf1b2b77f708c0a7602-init/diff:/var/lib/docker/overlay2/ddbc0fa8dd9d2f152e384ef159e2c80c9fbacbb76cd389810ef6fffba07bb8cd/diff:/var/lib/docker/overlay2/ea93afdc8e014ecdb269f88cb49c880cd85d8c2cc785a750ecefe14fb223be97/diff:/var/lib/docker/overlay2/425b176ae69d66691b25e241185188a727eaaeaa6b45dc3898d59c592713e90c/diff:/var/lib/docker/overlay2/804763b6415b9f155802e9c8bac8941770beea1aac9114bf7cc535e468a8fc78/diff:/var/lib/docker/overlay2/4f566e7c70c4bec33c0366ae10fee23f98910f07a3e5bbd17631c546f9f37c22/diff:/var/lib/docker/overlay2/6400bd3e20ee357bbec44e66b10c3ca3f93469ba10787c85451326ab4f638cbe/diff", "MergedDir": "/var/lib/docker/overlay2/83dc5148f3272b35de51130bac5147e69c622cee5df1faf1b2b77f708c0a7602/merged", "UpperDir": "/var/lib/docker/overlay2/83dc5148f3272b35de51130bac5147e69c622cee5df1faf1b2b77f708c0a7602/diff", "WorkDir": "/var/lib/docker/overlay2/83dc5148f3272b35de51130bac5147e69c622cee5df1faf1b2b77f708c0a7602/work" }, "Name": "overlay2" }, "Mounts": [], "Config": { "Hostname": "229e1d9a6467", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "ExposedPorts": { "80/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "NGINX_VERSION=1.25.0", "NJS_VERSION=0.7.12", "PKG_RELEASE=1~bullseye" ], "Cmd": [ "nginx", "-g", "daemon off;" ], "Image": "nginx", "Volumes": null, "WorkingDir": "", "Entrypoint": [ "/docker-entrypoint.sh" ], "OnBuild": null, "Labels": { "com.docker.compose.config-hash": "69c76738eb078a1f021cd3286906b1a43bdefce5e90b34a7741b877bda6d5019", "com.docker.compose.container-number": "1", "com.docker.compose.depends_on": "nats1:service_started:false,backend1:service_started:false", "com.docker.compose.image": "sha256:7d3c40f240e18f6b440bf06b1dfd8a9c48a49c1dfe3400772c3b378739cbdc47", "com.docker.compose.oneoff": "False", "com.docker.compose.project": "installer", "com.docker.compose.project.config_files": "/home/user/docker-compose.yml", "com.docker.compose.project.working_dir": "/home/user", "com.docker.compose.service": "nginx1", "com.docker.compose.version": "2.18.1", "maintainer": "NGINX Docker Maintainers " }, "StopSignal": "SIGQUIT" }, "NetworkSettings": { "Bridge": "", "SandboxID": "", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": {}, "SandboxKey": "", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "installer_default": { "IPAMConfig": null, "Links": null, "Aliases": [ "nginx1", "nginx1", "229e1d9a6467" ], "NetworkID": "", "EndpointID": "", "Gateway": "", "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "", "DriverOpts": null } } } } ] ```docker inspect backend1``` [ { "Id": "03805ac9ce99ffe26b02435b66b2a1d3b9ac5b443e9ea92f6b299190bb2de724", "Created": "2023-06-16T21:53:58.852276693Z", "Path": "tail", "Args": [ "-f", "/dev/null" ], "State": { "Status": "created", "Running": false, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 0, "ExitCode": 0, "Error": "", "StartedAt": "0001-01-01T00:00:00Z", "FinishedAt": "0001-01-01T00:00:00Z" }, "Image": "sha256:5e2b554c1c45d22c9d1aa836828828e320a26011b76c08631ac896cbc3625e3e", "ResolvConfPath": "", "HostnamePath": "", "HostsPath": "", "LogPath": "", "Name": "/backend1", "RestartCount": 0, "Driver": "overlay2", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": null, "HostConfig": { "Binds": null, "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "installer_default", "PortBindings": {}, "RestartPolicy": { "Name": "always", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "ConsoleSize": [ 0, 0 ], "CapAdd": null, "CapDrop": null, "CgroupnsMode": "private", "Dns": null, "DnsOptions": null, "DnsSearch": null, "ExtraHosts": [], "GroupAdd": null, "IpcMode": "private", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "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, "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/4ee4f35ea6d4b7ab626294d3ec33444032bbdacb256b69918d0ebb6dcd6c417f-init/diff:/var/lib/docker/overlay2/06f46ea36dcc9f24acceff2392c7f1525ca9aa13a8adc6dbaa52ed0ba9890f57/diff", "MergedDir": "/var/lib/docker/overlay2/4ee4f35ea6d4b7ab626294d3ec33444032bbdacb256b69918d0ebb6dcd6c417f/merged", "UpperDir": "/var/lib/docker/overlay2/4ee4f35ea6d4b7ab626294d3ec33444032bbdacb256b69918d0ebb6dcd6c417f/diff", "WorkDir": "/var/lib/docker/overlay2/4ee4f35ea6d4b7ab626294d3ec33444032bbdacb256b69918d0ebb6dcd6c417f/work" }, "Name": "overlay2" }, "Mounts": [], "Config": { "Hostname": "03805ac9ce99", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": [ "tail", "-f", "/dev/null" ], "Image": "alpine", "Volumes": null, "WorkingDir": "", "Entrypoint": null, "OnBuild": null, "Labels": { "com.docker.compose.config-hash": "61d452aceda7051ee9b683498189cc8fbc49f6a59c96ccef215a44f1947ffedc", "com.docker.compose.container-number": "1", "com.docker.compose.depends_on": "flyway1:service_completed_successfully:false", "com.docker.compose.image": "sha256:5e2b554c1c45d22c9d1aa836828828e320a26011b76c08631ac896cbc3625e3e", "com.docker.compose.oneoff": "False", "com.docker.compose.project": "installer", "com.docker.compose.project.config_files": "/home/user/docker-compose.yml", "com.docker.compose.project.working_dir": "/home/user", "com.docker.compose.service": "backend1", "com.docker.compose.version": "2.18.1" } }, "NetworkSettings": { "Bridge": "", "SandboxID": "", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": {}, "SandboxKey": "", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "installer_default": { "IPAMConfig": null, "Links": null, "Aliases": [ "backend1", "backend1", "03805ac9ce99" ], "NetworkID": "", "EndpointID": "", "Gateway": "", "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "", "DriverOpts": null } } } } ] ```docker inspect flyway1``` [ { "Id": "5351d2fe0544e83a27d0954f71200551df68e38f5bf523ee08429e6346f6db62", "Created": "2023-06-16T21:53:58.826229575Z", "Path": "/bin/false", "Args": [], "State": { "Status": "exited", "Running": false, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 0, "ExitCode": 1, "Error": "", "StartedAt": "2023-06-16T21:54:10.295899271Z", "FinishedAt": "2023-06-16T21:54:10.295501076Z" }, "Image": "sha256:5e2b554c1c45d22c9d1aa836828828e320a26011b76c08631ac896cbc3625e3e", "ResolvConfPath": "/var/lib/docker/containers/5351d2fe0544e83a27d0954f71200551df68e38f5bf523ee08429e6346f6db62/resolv.conf", "HostnamePath": "/var/lib/docker/containers/5351d2fe0544e83a27d0954f71200551df68e38f5bf523ee08429e6346f6db62/hostname", "HostsPath": "/var/lib/docker/containers/5351d2fe0544e83a27d0954f71200551df68e38f5bf523ee08429e6346f6db62/hosts", "LogPath": "/var/lib/docker/containers/5351d2fe0544e83a27d0954f71200551df68e38f5bf523ee08429e6346f6db62/5351d2fe0544e83a27d0954f71200551df68e38f5bf523ee08429e6346f6db62-json.log", "Name": "/flyway1", "RestartCount": 0, "Driver": "overlay2", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "docker-default", "ExecIDs": null, "HostConfig": { "Binds": null, "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "installer_default", "PortBindings": {}, "RestartPolicy": { "Name": "", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "ConsoleSize": [ 0, 0 ], "CapAdd": null, "CapDrop": null, "CgroupnsMode": "private", "Dns": null, "DnsOptions": null, "DnsSearch": null, "ExtraHosts": [], "GroupAdd": null, "IpcMode": "private", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "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, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "OomKillDisable": null, "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/dd3d7c708184bb5d9514a4ac5973787a0e618fbc428d9ec8d316e1ce8557b1bd-init/diff:/var/lib/docker/overlay2/06f46ea36dcc9f24acceff2392c7f1525ca9aa13a8adc6dbaa52ed0ba9890f57/diff", "MergedDir": "/var/lib/docker/overlay2/dd3d7c708184bb5d9514a4ac5973787a0e618fbc428d9ec8d316e1ce8557b1bd/merged", "UpperDir": "/var/lib/docker/overlay2/dd3d7c708184bb5d9514a4ac5973787a0e618fbc428d9ec8d316e1ce8557b1bd/diff", "WorkDir": "/var/lib/docker/overlay2/dd3d7c708184bb5d9514a4ac5973787a0e618fbc428d9ec8d316e1ce8557b1bd/work" }, "Name": "overlay2" }, "Mounts": [], "Config": { "Hostname": "5351d2fe0544", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": [ "/bin/false" ], "Image": "alpine", "Volumes": null, "WorkingDir": "", "Entrypoint": null, "OnBuild": null, "Labels": { "com.docker.compose.config-hash": "1888bebe1a924efe67f79119f095858e2579e0a0699b685de707c1b30f85368a", "com.docker.compose.container-number": "1", "com.docker.compose.depends_on": "db1:service_healthy:false", "com.docker.compose.image": "sha256:5e2b554c1c45d22c9d1aa836828828e320a26011b76c08631ac896cbc3625e3e", "com.docker.compose.oneoff": "False", "com.docker.compose.project": "installer", "com.docker.compose.project.config_files": "/home/user/docker-compose.yml", "com.docker.compose.project.working_dir": "/home/user", "com.docker.compose.service": "flyway1", "com.docker.compose.version": "2.18.1" } }, "NetworkSettings": { "Bridge": "", "SandboxID": "872a271d475b690892128b689dd5b11885fbad1358e19c080b0159480b8ab3fe", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": {}, "SandboxKey": "/var/run/docker/netns/872a271d475b", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "installer_default": { "IPAMConfig": null, "Links": null, "Aliases": [ "flyway1", "flyway1", "5351d2fe0544" ], "NetworkID": "8ada2c1a3e59aba7b9c40fe8fe6a58855a136a6085b9262e20b557b14770558c", "EndpointID": "", "Gateway": "", "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "", "DriverOpts": null } } } } ] ```docker inspect db1``` [ { "Id": "9b3a3513e662b3f5d384591c2900f498e72b11033bb4baeeb2440088c8fc5624", "Created": "2023-06-16T21:53:58.706804885Z", "Path": "docker-entrypoint.sh", "Args": [ "postgres" ], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 286532, "ExitCode": 0, "Error": "", "StartedAt": "2023-06-16T21:53:59.340518766Z", "FinishedAt": "0001-01-01T00:00:00Z", "Health": { "Status": "healthy", "FailingStreak": 0, "Log": [ { "Start": "2023-06-17T00:59:14.825483773+03:00", "End": "2023-06-17T00:59:15.015194212+03:00", "ExitCode": 0, "Output": "127.0.0.1:5432 - accepting connections\n" }, { "Start": "2023-06-17T00:59:25.021177682+03:00", "End": "2023-06-17T00:59:25.173167483+03:00", "ExitCode": 0, "Output": "127.0.0.1:5432 - accepting connections\n" }, { "Start": "2023-06-17T00:59:35.177997092+03:00", "End": "2023-06-17T00:59:35.345672591+03:00", "ExitCode": 0, "Output": "127.0.0.1:5432 - accepting connections\n" }, { "Start": "2023-06-17T00:59:45.35846604+03:00", "End": "2023-06-17T00:59:45.548239983+03:00", "ExitCode": 0, "Output": "127.0.0.1:5432 - accepting connections\n" }, { "Start": "2023-06-17T00:59:55.558578023+03:00", "End": "2023-06-17T00:59:55.7605932+03:00", "ExitCode": 0, "Output": "127.0.0.1:5432 - accepting connections\n" } ] } }, "Image": "sha256:082f128fd65a6b84be7ae5b00d2e9e1d30ea66f582efdef8f2522ea6cba8574c", "ResolvConfPath": "/var/lib/docker/containers/9b3a3513e662b3f5d384591c2900f498e72b11033bb4baeeb2440088c8fc5624/resolv.conf", "HostnamePath": "/var/lib/docker/containers/9b3a3513e662b3f5d384591c2900f498e72b11033bb4baeeb2440088c8fc5624/hostname", "HostsPath": "/var/lib/docker/containers/9b3a3513e662b3f5d384591c2900f498e72b11033bb4baeeb2440088c8fc5624/hosts", "LogPath": "/var/lib/docker/containers/9b3a3513e662b3f5d384591c2900f498e72b11033bb4baeeb2440088c8fc5624/9b3a3513e662b3f5d384591c2900f498e72b11033bb4baeeb2440088c8fc5624-json.log", "Name": "/db1", "RestartCount": 0, "Driver": "overlay2", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "docker-default", "ExecIDs": null, "HostConfig": { "Binds": null, "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "installer_default", "PortBindings": {}, "RestartPolicy": { "Name": "always", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "ConsoleSize": [ 0, 0 ], "CapAdd": null, "CapDrop": null, "CgroupnsMode": "private", "Dns": null, "DnsOptions": null, "DnsSearch": null, "ExtraHosts": [], "GroupAdd": null, "IpcMode": "private", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "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, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "OomKillDisable": null, "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/ce1742b85c78ad9be74b1e168a0c6fad312d1a6106ddb5ef8e700db4abffb281-init/diff:/var/lib/docker/overlay2/8e55970000eb04a5452c6044b4689ee61167be1e0ce4b23b7860229aa962551c/diff:/var/lib/docker/overlay2/bafa3ebaf302282465f0712273d308d578790169dc8a3938564e82cbd784797d/diff:/var/lib/docker/overlay2/4e0e576591636bb75170bae5c0ac280f81e0e0e89b814f9ac0269edb8d0554df/diff:/var/lib/docker/overlay2/5f571d7759e8de2ab99242a427201ed069e6a481d6924830c7fe35fa7d65ff46/diff:/var/lib/docker/overlay2/3c331b9f5f5a591a60f0884088bb0a6b352b465b6387891652bacc841a3b38ee/diff:/var/lib/docker/overlay2/9d4ce3adc1bf1c24abe295e52d2a28ebff4adc1469a4ff6236c6e4680b1b4202/diff:/var/lib/docker/overlay2/eb8d668124d9edff1e24110ab08486903e4eef622a20d2a23540614cc53f6705/diff:/var/lib/docker/overlay2/790e3a274d28025530b564c29e5049d827378378f6b398fecef361b88ffde974/diff:/var/lib/docker/overlay2/b55b0834d32945e452819042a65f49fc704c5a12f731f4321cfa75d845d8f27b/diff:/var/lib/docker/overlay2/1d09387564b1ada7a4bc2704b31d57e49c918cdcc9f14c44bcac929fabe9244c/diff:/var/lib/docker/overlay2/266a36b37efdb3ed867a5d9933095d4b02004e20d8d9cd18249d448587644e46/diff:/var/lib/docker/overlay2/b030d2a86df9d5a9a12367c6835e4f8a512ce9879f14ab1bfaa28e2b62b570d8/diff:/var/lib/docker/overlay2/6400bd3e20ee357bbec44e66b10c3ca3f93469ba10787c85451326ab4f638cbe/diff", "MergedDir": "/var/lib/docker/overlay2/ce1742b85c78ad9be74b1e168a0c6fad312d1a6106ddb5ef8e700db4abffb281/merged", "UpperDir": "/var/lib/docker/overlay2/ce1742b85c78ad9be74b1e168a0c6fad312d1a6106ddb5ef8e700db4abffb281/diff", "WorkDir": "/var/lib/docker/overlay2/ce1742b85c78ad9be74b1e168a0c6fad312d1a6106ddb5ef8e700db4abffb281/work" }, "Name": "overlay2" }, "Mounts": [ { "Type": "volume", "Name": "e1bf24ef0bcccc21b7e03d03b75c0d8108a09abfdbebeda86c2cee659418d0c7", "Source": "/var/lib/docker/volumes/e1bf24ef0bcccc21b7e03d03b75c0d8108a09abfdbebeda86c2cee659418d0c7/_data", "Destination": "/var/lib/postgresql/data", "Driver": "local", "Mode": "", "RW": true, "Propagation": "" } ], "Config": { "Hostname": "9b3a3513e662", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "ExposedPorts": { "5432/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "POSTGRES_PASSWORD=password", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/postgresql/15/bin", "GOSU_VERSION=1.16", "LANG=en_US.utf8", "PG_MAJOR=15", "PG_VERSION=15.3-1.pgdg110+1", "PGDATA=/var/lib/postgresql/data" ], "Cmd": [ "postgres" ], "Healthcheck": { "Test": [ "CMD-SHELL", "pg_isready -h 127.0.0.1" ], "Interval": 10000000000, "Timeout": 5000000000, "StartPeriod": 10000000000, "Retries": 5 }, "Image": "postgres", "Volumes": { "/var/lib/postgresql/data": {} }, "WorkingDir": "", "Entrypoint": [ "docker-entrypoint.sh" ], "OnBuild": null, "Labels": { "com.docker.compose.config-hash": "dd1c1ee39b53d41eb17844795488aa8df725f1ee970105185c0261cdcbec1285", "com.docker.compose.container-number": "1", "com.docker.compose.depends_on": "", "com.docker.compose.image": "sha256:082f128fd65a6b84be7ae5b00d2e9e1d30ea66f582efdef8f2522ea6cba8574c", "com.docker.compose.oneoff": "False", "com.docker.compose.project": "installer", "com.docker.compose.project.config_files": "/home/user/docker-compose.yml", "com.docker.compose.project.working_dir": "/home/user", "com.docker.compose.service": "db1", "com.docker.compose.version": "2.18.1" }, "StopSignal": "SIGINT" }, "NetworkSettings": { "Bridge": "", "SandboxID": "2120d373542cc3a62becba4a0005eff2df2ef7a97b329a6bb7f67c2dec8e4d2d", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": { "5432/tcp": null }, "SandboxKey": "/var/run/docker/netns/2120d373542c", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "installer_default": { "IPAMConfig": null, "Links": null, "Aliases": [ "db1", "db1", "9b3a3513e662" ], "NetworkID": "8ada2c1a3e59aba7b9c40fe8fe6a58855a136a6085b9262e20b557b14770558c", "EndpointID": "4f787847cfb9af4ced0a368999f55e770e3536167575184d0b452bd30e4e3f62", "Gateway": "172.19.0.1", "IPAddress": "172.19.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:13:00:02", "DriverOpts": null } } } } ] ```docker inspect nats1```[ Please update me if you need additional information |
I was able to reproduce with provided example, thanks ! |
Description
I have a compose with number of services. If all services started as expected, then everything works fine.
If one of services that other services depends on him failed, all process hangs forever and ctrl+c doesn't help
Steps To Reproduce
Here is docker compose with problem..
using command:
docker compose up -d
Compose Version
Docker Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: