Skip to content
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

Containers of a compose stack start in the wrong order #2006

Open
thueske opened this issue Jul 29, 2024 · 1 comment
Open

Containers of a compose stack start in the wrong order #2006

thueske opened this issue Jul 29, 2024 · 1 comment

Comments

@thueske
Copy link

thueske commented Jul 29, 2024

Describe the bug

The containers in my compose stack start in the wrong order. The non-dependent containers are started first and the container that should actually be started first is started last.

Steps to reproduce

The containers in my compose stack start in the wrong order. The non-dependent containers (media-browser-1, media-app-1, media-dlna-1, media-server-1) are started first and the container that should actually be started first (media-vpn-1) is started last. I think it only happens when using the network_mode: "service:vpn" (see in Environment).

Expected behavior

When updating the image of media-vpn-1, the media-vpn-1 container should be started first and then the other containers.

Screenshots

No response

Environment

Latest docker and watchtower.

services:
  vpn:
    image: myvpn:latest
    restart: unless-stopped

  browser:
    image: mybrowser:latest
    restart: unless-stopped
    depends_on:
      vpn:
        condition: service_healthy
    network_mode: "service:vpn"

  app:
    image: myapp:latest
    restart: unless-stopped
    depends_on:
      vpn:
        condition: service_healthy
    network_mode: "service:vpn"

  dlna:
    image: mydlna:latest
    restart: unless-stopped
    depends_on:
      vpn:
        condition: service_healthy
    network_mode: "service:vpn"

  server:
    image: myserver:latest
    restart: unless-stopped
    depends_on:
      vpn:
        condition: service_healthy
    network_mode: "service:vpn"

Your logs

app-1  | time="2024-07-29T03:07:05+02:00" level=info msg="Stopping /media-server-1 (f2f85a6505d0) with SIGTERM"
app-1  | time="2024-07-29T03:07:06+02:00" level=info msg="Creating /media-server-1"
app-1  | time="2024-07-29T03:07:07+02:00" level=info msg="Stopping /media-dlna-1 (fdcaab46b6b8) with SIGTERM"
app-1  | time="2024-07-29T03:07:08+02:00" level=info msg="Creating /media-dlna-1"
app-1  | time="2024-07-29T03:07:08+02:00" level=info msg="Stopping /media-app-1 (997b5e7043b4) with SIGTERM"
app-1  | time="2024-07-29T03:07:14+02:00" level=info msg="Creating /media-app-1"
app-1  | time="2024-07-29T03:07:14+02:00" level=info msg="Stopping /media-browser-1 (4d28dbd5ac9a) with SIGTERM"
app-1  | time="2024-07-29T03:07:19+02:00" level=info msg="Creating /media-browser-1"
app-1  | time="2024-07-29T03:07:20+02:00" level=info msg="Stopping /media-vpn-1 (b851fda3d3e3) with SIGTERM"
app-1  | time="2024-07-29T03:07:21+02:00" level=info msg="Creating /media-vpn-1"
app-1  | time="2024-07-29T03:07:37+02:00" level=warning msg="Unable to resolve network container: Error response from daemon: No such container: b851fda3d3e3050f5121bf3aa55440817455568e22cad73055fcb1c6c28e8dc8" container=/media-browser-1 error="Error response from daemon: No such container: b851fda3d3e3050f5121bf3aa55440817455568e22cad73055fcb1c6c28e8dc8" network-container=b851fda3d3e3050f5121bf3aa55440817455568e22cad73055fcb1c6c28e8dc8
app-1  | time="2024-07-29T03:07:37+02:00" level=warning msg="Unable to resolve network container: Error response from daemon: No such container: b851fda3d3e3050f5121bf3aa55440817455568e22cad73055fcb1c6c28e8dc8" container=/media-app-1 error="Error response from daemon: No such container: b851fda3d3e3050f5121bf3aa55440817455568e22cad73055fcb1c6c28e8dc8" network-container=b851fda3d3e3050f5121bf3aa55440817455568e22cad73055fcb1c6c28e8dc8
app-1  | time="2024-07-29T03:07:37+02:00" level=warning msg="Unable to resolve network container: Error response from daemon: No such container: b851fda3d3e3050f5121bf3aa55440817455568e22cad73055fcb1c6c28e8dc8" container=/media-dlna-1 error="Error response from daemon: No such container: b851fda3d3e3050f5121bf3aa55440817455568e22cad73055fcb1c6c28e8dc8" network-container=b851fda3d3e3050f5121bf3aa55440817455568e22cad73055fcb1c6c28e8dc8
app-1  | time="2024-07-29T03:07:37+02:00" level=warning msg="Unable to resolve network container: Error response from daemon: No such container: b851fda3d3e3050f5121bf3aa55440817455568e22cad73055fcb1c6c28e8dc8" container=/media-server-1 error="Error response from daemon: No such container: b851fda3d3e3050f5121bf3aa55440817455568e22cad73055fcb1c6c28e8dc8" network-container=b851fda3d3e3050f5121bf3aa55440817455568e22cad73055fcb1c6c28e8dc8
app-1  | time="2024-07-29T03:07:37+02:00" level=info msg="Session done" Failed=0 Scanned=49 Updated=8 notify=no

Additional context

No response

Copy link

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant