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

[BUG] (maybe) missing "[container] exited with code [code]" messages during attach #12111

Closed
laurazard opened this issue Sep 10, 2024 · 0 comments · Fixed by #12158
Closed

[BUG] (maybe) missing "[container] exited with code [code]" messages during attach #12111

laurazard opened this issue Sep 10, 2024 · 0 comments · Fixed by #12158
Assignees
Labels

Comments

@laurazard
Copy link
Member

Description

I'm not sure whether this is intended, but there was a behavior change introduced in ea4ccf6 where I no longer see the [container] exited with code [code] every time the container restarts. Instead, I only see it once, for the first time:

Steps To Reproduce

With this Dockerfile:

FROM alpine:latest AS occupied

CMD ["sleep", "3600"]

FROM alpine:latest AS surplus

CMD ["sleep", "10"]

And the following Compose file:

services:
  occupied:
    image: container-used:latest
  
  surplus:
    restart: unless-stopped
    image: container-surplus:latest

Run docker compose up --scale occupied=8 --scale surplus=2.

Pre ea4ccf6 I see:

[...]
Attaching to occupied-1, occupied-2, occupied-3, occupied-4, occupied-5, occupied-6, occupied-7, occupied-8, surplus-1, surplus-2
surplus-1 exited with code 0
surplus-2 exited with code 0
surplus-1 exited with code 0
surplus-2 exited with code 0
surplus-1 exited with code 0
surplus-2 exited with code 0
[...]

But afterwards, I only see the first ...exited with code... message for each container, and never again:

Attaching to occupied-1, occupied-2, occupied-3, occupied-4, occupied-5, occupied-6, occupied-7, occupied-8, surplus-1, surplus-2
surplus-2 exited with code 0
surplus-1 exited with code 0
[nothing else]

Compose Version

-

Docker Environment

-

Anything else?

No response

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

Successfully merging a pull request may close this issue.

2 participants