We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
One of my docker compose containers is failing to come up, and so I get an unhelpful error message:
dependency failed to start: container 62e034fc-fae9-4e80-af07-8c1d8902b1da-minio_init-1 is unhealthy
If I was using the Docker compose CLI, I would call docker compose logs to see why the container was failing.
docker compose logs
Add something to the Compose module's API to get logs of all the containers
Debugging, providing helpful test output in the case of failures
Not as far as I can think of
Yes
The text was updated successfully, but these errors were encountered:
As a workaround I came up with this:
t.Cleanup(func() { ctx := context.Background() for _, service := range compose.Services() { container, err := compose.ServiceContainer(ctx, service) if err != nil { t.Logf("failed to get container for service %q: %v", service, err) continue } logs, err := container.Logs(ctx) if err != nil { t.Logf("failed to get logs for service %q: %v", service, err) continue } buf, err := io.ReadAll(logs) if err != nil { t.Logf("failed to read logs for service %q: %v", service, err) continue } t.Logf("[%s]\n%s", service, string(buf)) } })
Sorry, something went wrong.
No branches or pull requests
Problem
One of my docker compose containers is failing to come up, and so I get an unhelpful error message:
If I was using the Docker compose CLI, I would call
docker compose logs
to see why the container was failing.Solution
Add something to the Compose module's API to get logs of all the containers
Benefit
Debugging, providing helpful test output in the case of failures
Alternatives
Not as far as I can think of
Would you like to help contributing this feature?
Yes
The text was updated successfully, but these errors were encountered: