-
-
Notifications
You must be signed in to change notification settings - Fork 251
Closed
Description
Expected Behaviour
When enabling log capture for docker compose, all containers logs should be capture regardless of the success of docker compose up
Actual Behaviour
Container logs are only captures if the compose stack successfully starts. This is related to #685.
Testcontainer Logs
...
Steps to Reproduce
- Enable container log capture:
export DEBUG="testcontainers*" - Use a configuration with a failing dependency:
version: '3.8' services: redis: image: redis:alpine healthcheck: test: ["CMD-SHELL", "exit 1"] interval: 5s timeout: 3s retries: 5 start_period: 10s hello: image: nginxdemos/hello ports: - "8080:80" depends_on: redis: condition: service_healthy - Use testcontainers to start the compose stack:
let environment = new DockerComposeEnvironment( __dirname, 'docker-compose.yml', ).withDefaultWaitStrategy(Wait.forHealthCheck()); await environment.up(); - Notice that the stack will fail to start without printing any container logs.
Environment Information
- Operating System: Ubuntu 24.04.3 LTS
- Docker Version: 28.0.4
- Node version: 24.10.0
- Testcontainers version: 11.0.3
Metadata
Metadata
Assignees
Labels
No labels