testcontainers / testcontainers-node

Testcontainers is a NodeJS library that supports tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
https://testcontainers.com
MIT License
1.91k stars 190 forks source link

Tests does not run as expected on mac M1 machines #381

Closed cwkang1998 closed 2 years ago

cwkang1998 commented 2 years ago

Expected Behaviour Tests to run as expected as a windows or linux machine.

Actual Behaviour Tests failing. Attached are the failing tests.

Summary of all failing tests
 FAIL  src/modules/kafka/kafka-container.test.ts (541.883 s)
  ● KafkaContainer › should be reusable

    Port 9093 not bound after 180000ms for 20ab897a13b1bbe7e949bc41f8b7c33c8806cf9e35296b36f40d08380a9923f5

      59 |       () => {
      60 |         const timeout = this.startupTimeout;
    > 61 |         throw new Error(`Port ${port} not bound after ${timeout}ms for ${container.id}`);
         |               ^
      62 |       },
      63 |       this.startupTimeout
      64 |     );

      at src/wait-strategy.ts:61:15
      at IntervalRetryStrategy.<anonymous> (src/retry-strategy.ts:48:16)
      at fulfilled (src/retry-strategy.ts:5:58)
          at runMicrotasks (<anonymous>)

  ● KafkaContainer › when a set of certificates is provided › should expose SASL_SSL listener if configured

    Port 9093 not bound after 180000ms for 8b491509e626a44bc3cc33da313d6f6f9877e3b7e6a40e2b2e464a4b7ccfe3c6

      59 |       () => {
      60 |         const timeout = this.startupTimeout;
    > 61 |         throw new Error(`Port ${port} not bound after ${timeout}ms for ${container.id}`);
         |               ^
      62 |       },
      63 |       this.startupTimeout
      64 |     );

      at src/wait-strategy.ts:61:15
      at IntervalRetryStrategy.<anonymous> (src/retry-strategy.ts:48:16)
      at fulfilled (src/retry-strategy.ts:5:58)
          at runMicrotasks (<anonymous>)

 FAIL  src/docker-compose-environment/docker-compose-environment.test.ts (41.519 s)
  ● DockerComposeEnvironment › should start all containers in the compose file

    Cannot get container "container_1" as it is not running

      28 |       const error = `Cannot get container "${containerName}" as it is not running`;
      29 |       log.error(error);
    > 30 |       throw new Error(error);
         |             ^
      31 |     }
      32 |     return container;
      33 |   }

      at StartedDockerComposeEnvironment.getContainer (src/docker-compose-environment/started-docker-compose-environment.ts:30:13)
      at src/test-helper.ts:18:40
      at src/test-helper.ts:8:71
      at Object.<anonymous>.__awaiter (src/test-helper.ts:4:12)
      at checkEnvironmentContainerIsHealthy (src/test-helper.ts:17:20)
      at src/docker-compose-environment/docker-compose-environment.test.ts:21:74
      at src/docker-compose-environment/docker-compose-environment.test.ts:8:71

  ● DockerComposeEnvironment › should start environment with multiple compose files

    Cannot get container "container_1" as it is not running

      28 |       const error = `Cannot get container "${containerName}" as it is not running`;
      29 |       log.error(error);
    > 30 |       throw new Error(error);
         |             ^
      31 |     }
      32 |     return container;
      33 |   }

      at StartedDockerComposeEnvironment.getContainer (src/docker-compose-environment/started-docker-compose-environment.ts:30:13)
      at src/docker-compose-environment/docker-compose-environment.test.ts:43:42
      at fulfilled (src/docker-compose-environment/docker-compose-environment.test.ts:5:58)
          at runMicrotasks (<anonymous>)

  ● DockerComposeEnvironment › should support log message wait strategy

    Cannot get container "container_1" as it is not running

      28 |       const error = `Cannot get container "${containerName}" as it is not running`;
      29 |       log.error(error);
    > 30 |       throw new Error(error);
         |             ^
      31 |     }
      32 |     return container;
      33 |   }

      at StartedDockerComposeEnvironment.getContainer (src/docker-compose-environment/started-docker-compose-environment.ts:30:13)
      at src/test-helper.ts:18:40
      at src/test-helper.ts:8:71
      at Object.<anonymous>.__awaiter (src/test-helper.ts:4:12)
      at checkEnvironmentContainerIsHealthy (src/test-helper.ts:17:20)
      at src/docker-compose-environment/docker-compose-environment.test.ts:62:74
      at src/docker-compose-environment/docker-compose-environment.test.ts:8:71

  ● DockerComposeEnvironment › should stop the container when the health check wait strategy times out

    expect(received).rejects.toThrowError(expected)

    Expected substring: "Health check not healthy after 0ms"
    Received message:   "Port 8080 not bound after 0ms for 7a95885ad4037853ad51f971d176ea6e41854cccb39f973c08a10ba67eeb7501"

          59 |       () => {
          60 |         const timeout = this.startupTimeout;
        > 61 |         throw new Error(`Port ${port} not bound after ${timeout}ms for ${container.id}`);
             |               ^
          62 |       },
          63 |       this.startupTimeout
          64 |     );

          at src/wait-strategy.ts:61:15
          at IntervalRetryStrategy.<anonymous> (src/retry-strategy.ts:48:16)
          at fulfilled (src/retry-strategy.ts:5:58)

      84 |         .withStartupTimeout(0)
      85 |         .up()
    > 86 |     ).rejects.toThrowError(`Health check not healthy after 0ms`);
         |               ^
      87 |
      88 |     expect(await getRunningContainerNames()).not.toContain("container_1");
      89 |   });

      at Object.toThrowError (node_modules/expect/build/index.js:285:22)
      at src/docker-compose-environment/docker-compose-environment.test.ts:86:15
      at src/docker-compose-environment/docker-compose-environment.test.ts:8:71
      at Object.<anonymous>.__awaiter (src/docker-compose-environment/docker-compose-environment.test.ts:4:12)
      at Object.<anonymous> (src/docker-compose-environment/docker-compose-environment.test.ts:80:92)

  ● DockerComposeEnvironment › should support health check wait strategy

    Cannot get container "container_1" as it is not running

      28 |       const error = `Cannot get container "${containerName}" as it is not running`;
      29 |       log.error(error);
    > 30 |       throw new Error(error);
         |             ^
      31 |     }
      32 |     return container;
      33 |   }

      at StartedDockerComposeEnvironment.getContainer (src/docker-compose-environment/started-docker-compose-environment.ts:30:13)
      at src/test-helper.ts:18:40
      at src/test-helper.ts:8:71
      at Object.<anonymous>.__awaiter (src/test-helper.ts:4:12)
      at checkEnvironmentContainerIsHealthy (src/test-helper.ts:17:20)
      at src/docker-compose-environment/docker-compose-environment.test.ts:96:45
      at fulfilled (src/docker-compose-environment/docker-compose-environment.test.ts:5:58)

  ● DockerComposeEnvironment › should re-build the Dockerfiles

    Cannot get container "container_1" as it is not running

      28 |       const error = `Cannot get container "${containerName}" as it is not running`;
      29 |       log.error(error);
    > 30 |       throw new Error(error);
         |             ^
      31 |     }
      32 |     return container;
      33 |   }

      at StartedDockerComposeEnvironment.getContainer (src/docker-compose-environment/started-docker-compose-environment.ts:30:13)
      at src/test-helper.ts:18:40
      at src/test-helper.ts:8:71
      at Object.<anonymous>.__awaiter (src/test-helper.ts:4:12)
      at checkEnvironmentContainerIsHealthy (src/test-helper.ts:17:20)
      at src/docker-compose-environment/docker-compose-environment.test.ts:134:74
      at src/docker-compose-environment/docker-compose-environment.test.ts:8:71

  ● DockerComposeEnvironment › should bind environment variables to the docker compose file

    Cannot get container "container_1" as it is not running

      28 |       const error = `Cannot get container "${containerName}" as it is not running`;
      29 |       log.error(error);
    > 30 |       throw new Error(error);
         |             ^
      31 |     }
      32 |     return container;
      33 |   }

      at StartedDockerComposeEnvironment.getContainer (src/docker-compose-environment/started-docker-compose-environment.ts:30:13)
      at src/docker-compose-environment/docker-compose-environment.test.ts:146:42
      at fulfilled (src/docker-compose-environment/docker-compose-environment.test.ts:5:58)
          at runMicrotasks (<anonymous>)

  ● DockerComposeEnvironment › should support starting a subset of services defined in the docker-compose file

    Cannot get container "service_2_1" as it is not running

      28 |       const error = `Cannot get container "${containerName}" as it is not running`;
      29 |       log.error(error);
    > 30 |       throw new Error(error);
         |             ^
      31 |     }
      32 |     return container;
      33 |   }

      at StartedDockerComposeEnvironment.getContainer (src/docker-compose-environment/started-docker-compose-environment.ts:30:13)
      at src/test-helper.ts:18:40
      at src/test-helper.ts:8:71
      at Object.<anonymous>.__awaiter (src/test-helper.ts:4:12)
      at checkEnvironmentContainerIsHealthy (src/test-helper.ts:17:20)
      at src/docker-compose-environment/docker-compose-environment.test.ts:169:45
      at fulfilled (src/docker-compose-environment/docker-compose-environment.test.ts:5:58)

  ● DockerComposeEnvironment › should load .env if no environment file option given

    Cannot get container "container_1" as it is not running

      28 |       const error = `Cannot get container "${containerName}" as it is not running`;
      29 |       log.error(error);
    > 30 |       throw new Error(error);
         |             ^
      31 |     }
      32 |     return container;
      33 |   }

      at StartedDockerComposeEnvironment.getContainer (src/docker-compose-environment/started-docker-compose-environment.ts:30:13)
      at src/docker-compose-environment/docker-compose-environment.test.ts:194:42
      at fulfilled (src/docker-compose-environment/docker-compose-environment.test.ts:5:58)
          at runMicrotasks (<anonymous>)

  ● DockerComposeEnvironment › should load the values in the environment file if the environment file option is set

    Cannot get container "container_1" as it is not running

      28 |       const error = `Cannot get container "${containerName}" as it is not running`;
      29 |       log.error(error);
    > 30 |       throw new Error(error);
         |             ^
      31 |     }
      32 |     return container;
      33 |   }

      at StartedDockerComposeEnvironment.getContainer (src/docker-compose-environment/started-docker-compose-environment.ts:30:13)
      at src/docker-compose-environment/docker-compose-environment.test.ts:209:42
      at fulfilled (src/docker-compose-environment/docker-compose-environment.test.ts:5:58)
          at runMicrotasks (<anonymous>)

  ● DockerComposeEnvironment › should start containers with a profile if profile option is set

    Cannot get container "container_1" as it is not running

      28 |       const error = `Cannot get container "${containerName}" as it is not running`;
      29 |       log.error(error);
    > 30 |       throw new Error(error);
         |             ^
      31 |     }
      32 |     return container;
      33 |   }

      at StartedDockerComposeEnvironment.getContainer (src/docker-compose-environment/started-docker-compose-environment.ts:30:13)
      at src/test-helper.ts:18:40
      at src/test-helper.ts:8:71
      at Object.<anonymous>.__awaiter (src/test-helper.ts:4:12)
      at checkEnvironmentContainerIsHealthy (src/test-helper.ts:17:20)
      at src/docker-compose-environment/docker-compose-environment.test.ts:224:74
      at src/docker-compose-environment/docker-compose-environment.test.ts:8:71

 FAIL  src/modules/mysql/mysql-container.test.ts (20.314 s)
  ● MySqlContainer › should work

    (HTTP code 404) no such container - No such image: mysql:8.0.26

      at node_modules/docker-modem/lib/modem.js:324:17
      at getCause (node_modules/docker-modem/lib/modem.js:354:7)
      at Modem.Object.<anonymous>.Modem.buildPayload (node_modules/docker-modem/lib/modem.js:323:5)
      at IncomingMessage.<anonymous> (node_modules/docker-modem/lib/modem.js:295:14)

  ● MySqlContainer › should set database

    (HTTP code 404) no such container - No such image: mysql:8.0.26

      at node_modules/docker-modem/lib/modem.js:324:17
      at getCause (node_modules/docker-modem/lib/modem.js:354:7)
      at Modem.Object.<anonymous>.Modem.buildPayload (node_modules/docker-modem/lib/modem.js:323:5)
      at IncomingMessage.<anonymous> (node_modules/docker-modem/lib/modem.js:295:14)

  ● MySqlContainer › should set username

    (HTTP code 404) no such container - No such image: mysql:8.0.26

      at node_modules/docker-modem/lib/modem.js:324:17
      at getCause (node_modules/docker-modem/lib/modem.js:354:7)
      at Modem.Object.<anonymous>.Modem.buildPayload (node_modules/docker-modem/lib/modem.js:323:5)
      at IncomingMessage.<anonymous> (node_modules/docker-modem/lib/modem.js:295:14)

  ● MySqlContainer › should execute a query and return the result

    (HTTP code 404) no such container - No such image: mysql:8.0.26

      at node_modules/docker-modem/lib/modem.js:324:17
      at getCause (node_modules/docker-modem/lib/modem.js:354:7)
      at Modem.Object.<anonymous>.Modem.buildPayload (node_modules/docker-modem/lib/modem.js:323:5)
      at IncomingMessage.<anonymous> (node_modules/docker-modem/lib/modem.js:295:14)

 FAIL  src/modules/arangodb/arangodb-container.test.ts (5.666 s)
  ● ArangoDB › should connect

    (HTTP code 404) no such container - No such image: arangodb:3.7.13

      at node_modules/docker-modem/lib/modem.js:324:17
      at getCause (node_modules/docker-modem/lib/modem.js:354:7)
      at Modem.Object.<anonymous>.Modem.buildPayload (node_modules/docker-modem/lib/modem.js:323:5)
      at IncomingMessage.<anonymous> (node_modules/docker-modem/lib/modem.js:295:14)

 FAIL  src/reaper.test.ts (41.352 s)
  ● Reaper › should remove docker-compose containers

    Cannot get container "container_1" as it is not running

      28 |       const error = `Cannot get container "${containerName}" as it is not running`;
      29 |       log.error(error);
    > 30 |       throw new Error(error);
         |             ^
      31 |     }
      32 |     return container;
      33 |   }

      at StartedDockerComposeEnvironment.getContainer (src/docker-compose-environment/started-docker-compose-environment.ts:30:13)
      at src/reaper.test.ts:34:42
      at fulfilled (src/reaper.test.ts:5:58)
          at runMicrotasks (<anonymous>)

 FAIL  src/modules/neo4j/neo4j-container.test.ts (16.146 s)
  ● Neo4jContainer › should create a person node

    (HTTP code 404) no such container - No such image: neo4j:4.3.2

      at node_modules/docker-modem/lib/modem.js:324:17
      at getCause (node_modules/docker-modem/lib/modem.js:354:7)
      at Modem.Object.<anonymous>.Modem.buildPayload (node_modules/docker-modem/lib/modem.js:323:5)
      at IncomingMessage.<anonymous> (node_modules/docker-modem/lib/modem.js:295:14)

  ● Neo4jContainer › should connect with custom password

    (HTTP code 404) no such container - No such image: neo4j:4.3.2

      at node_modules/docker-modem/lib/modem.js:324:17
      at getCause (node_modules/docker-modem/lib/modem.js:354:7)
      at Modem.Object.<anonymous>.Modem.buildPayload (node_modules/docker-modem/lib/modem.js:323:5)
      at IncomingMessage.<anonymous> (node_modules/docker-modem/lib/modem.js:295:14)

  ● Neo4jContainer › should have APOC plugin installed

    (HTTP code 404) no such container - No such image: neo4j:4.3.2

      at node_modules/docker-modem/lib/modem.js:324:17
      at getCause (node_modules/docker-modem/lib/modem.js:354:7)
      at Modem.Object.<anonymous>.Modem.buildPayload (node_modules/docker-modem/lib/modem.js:323:5)
      at IncomingMessage.<anonymous> (node_modules/docker-modem/lib/modem.js:295:14)

 FAIL  src/generic-container/generic-container.test.ts (113.672 s)
  ● GenericContainer › should pull an image from a private registry

    (HTTP code 404) unexpected - pull access denied for cristianrgreco/testcontainer-private, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

      at node_modules/docker-modem/lib/modem.js:324:17
      at IncomingMessage.<anonymous> (node_modules/docker-modem/lib/modem.js:351:9)

  ● GenericContainer › reuse › should not reuse the container by default

    (HTTP code 409) unexpected - Conflict. The container name "/there_can_only_be_one" is already in use by container "0dd8d2be822fc3f096c102fb0064e7eb79f84f7a14ba7898173da2443f1cde2a". You have to remove (or rename) that container to be able to reuse that name.

      at node_modules/docker-modem/lib/modem.js:324:17
      at getCause (node_modules/docker-modem/lib/modem.js:354:7)
      at Modem.Object.<anonymous>.Modem.buildPayload (node_modules/docker-modem/lib/modem.js:323:5)
      at IncomingMessage.<anonymous> (node_modules/docker-modem/lib/modem.js:295:14)

  ● GenericContainer › from Dockerfile › should pull an image from a private registry

    Failed to build image

      53 |
      54 |     if (!(await imageExists(imageName))) {
    > 55 |       throw new Error("Failed to build image");
         |             ^
      56 |     }
      57 |
      58 |     return Promise.resolve(container);

      at GenericContainerBuilder.<anonymous> (src/generic-container/generic-container-builder.ts:55:13)
      at fulfilled (src/generic-container/generic-container-builder.ts:5:58)
          at runMicrotasks (<anonymous>)

  ● GenericContainer › from Dockerfile › should pull an image from a private registry in a multistage Dockerfile

    Failed to build image

      53 |
      54 |     if (!(await imageExists(imageName))) {
    > 55 |       throw new Error("Failed to build image");
         |             ^
      56 |     }
      57 |
      58 |     return Promise.resolve(container);

      at GenericContainerBuilder.<anonymous> (src/generic-container/generic-container-builder.ts:55:13)
      at fulfilled (src/generic-container/generic-container-builder.ts:5:58)
          at runMicrotasks (<anonymous>)

Test Suites: 7 failed, 19 passed, 26 total
Tests:       26 failed, 2 skipped, 128 passed, 156 total

Testcontainer Logs Its a long log, so not going to include everything here, focusing on docker-compose-environment test


> testcontainers@8.11.1 test
> cross-env DEBUG=testcontainers jest --runInBand "src/docker-compose-environment"

  testcontainers INFO  Starting DockerCompose environment: testcontainers-9e2fdb09a0d512a0ded7463d840e0dcb +0ms
  testcontainers DEBUG Creating new Reaper for session: b5b5dd5fe19d76388455703fbf09ed48 +0ms
  testcontainers DEBUG Executing Docker credential provider: docker-credential-desktop +6ms
  testcontainers DEBUG No credential found for registry: "https://index.docker.io/v1/" +71ms
  testcontainers DEBUG No registry auth locator found for registry: "https://index.docker.io/v1/" +0ms
  testcontainers DEBUG Found applicable Docker client strategy: UnixSocketStrategy +1ms
  testcontainers DEBUG Testing Docker client strategy URI: unix:///var/run/docker.sock +0ms
  testcontainers INFO  Using Docker client strategy: UnixSocketStrategy, Docker host: localhost +17ms
  testcontainers DEBUG Not pulling image as it already exists: testcontainers/ryuk:0.3.2 +22ms
  testcontainers INFO  Creating container for image: testcontainers/ryuk:0.3.2 +0ms
  testcontainers INFO  Starting container testcontainers/ryuk:0.3.2 with ID: c08e7905472f3c8934535ac05376bd8c411bae9ea5b0f77811f7b3c7121b0300 +36ms
  testcontainers DEBUG System diagnostics: {"node":{"version":"v16.15.1","architecture":"arm64","platform":"darwin"},"docker":{"serverVersion":"20.10.17","operatingSystem":"Docker Desktop","operatingSystemType":"linux","architecture":"aarch64","cpus":5,"memory":8337399808},"dockerCompose":{"version":"2.6.1"}} +252ms
  testcontainers DEBUG Waiting for container to be ready: c08e7905472f3c8934535ac05376bd8c411bae9ea5b0f77811f7b3c7121b0300 +40ms
  testcontainers DEBUG Waiting for log message "/.+ Started!/" +0ms
  testcontainers INFO  Container is ready +4ms
  testcontainers DEBUG Connecting to Reaper c08e7905472f3c8934535ac05376bd8c411bae9ea5b0f77811f7b3c7121b0300 on localhost:55200 +0ms
  testcontainers DEBUG Connected to Reaper c08e7905472f3c8934535ac05376bd8c411bae9ea5b0f77811f7b3c7121b0300 +3ms
  testcontainers INFO  Upping DockerCompose environment +1ms
  testcontainers ERROR Failed to up DockerCompose environment: version must be a string
  testcontainers  +110ms
  testcontainers INFO  Downing DockerCompose environment +0ms
  testcontainers ERROR Failed to down DockerCompose environment: version must be a string
  testcontainers  +88ms
  testcontainers WARN  Failed to down DockerCompose environment after failed up +1ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-978fe62e7aeb67534105dc5192dda709 +4ms
  testcontainers INFO  Upping DockerCompose environment +0ms
  testcontainers INFO  Upped DockerCompose environment +612ms
  testcontainers INFO  Started the following containers: /testcontainers-978fe62e7aeb67534105dc5192dda709-another_container-1, /testcontainers-978fe62e7aeb67534105dc5192dda709-container-1 +6ms
  testcontainers INFO  Waiting for container container-1 to be ready +10ms
  testcontainers DEBUG Waiting for host port 51067 for 091dd6c4f6d6bd681acf8789d20acdea7f7a52ded30e24bd11e08a9aab72d687 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for 091dd6c4f6d6bd681acf8789d20acdea7f7a52ded30e24bd11e08a9aab72d687 +1ms
  testcontainers INFO  Waiting for container another_container-1 to be ready +1ms
  testcontainers DEBUG Waiting for host port 51066 for df8b58643c6edf34421edc10632a2bb7430eaed2f74c05fcc0976211bacb8d26 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for df8b58643c6edf34421edc10632a2bb7430eaed2f74c05fcc0976211bacb8d26 +0ms
  testcontainers DEBUG Host port 51067 ready for 091dd6c4f6d6bd681acf8789d20acdea7f7a52ded30e24bd11e08a9aab72d687 +5ms
  testcontainers DEBUG Host port 51066 ready for df8b58643c6edf34421edc10632a2bb7430eaed2f74c05fcc0976211bacb8d26 +0ms
  testcontainers DEBUG Internal port 8080 ready for df8b58643c6edf34421edc10632a2bb7430eaed2f74c05fcc0976211bacb8d26 +2s
  testcontainers INFO  Container another_container-1 is ready +0ms
  testcontainers DEBUG Internal port 8080 ready for 091dd6c4f6d6bd681acf8789d20acdea7f7a52ded30e24bd11e08a9aab72d687 +1ms
  testcontainers INFO  Container container-1 is ready +0ms
  testcontainers INFO  DockerCompose environment started: another_container-1, container-1 +0ms
  testcontainers ERROR Cannot get container "container_1" as it is not running +0ms
  testcontainers ERROR Cannot get container "another_container_1" as it is not running +1ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-50a5fc886425b58ff38e529ea30cb6f7 +9ms
  testcontainers INFO  Upping DockerCompose environment +1ms
  testcontainers INFO  Upped DockerCompose environment +421ms
  testcontainers INFO  Started the following containers: /custom_container_name +7ms
  testcontainers INFO  Waiting for container custom_container_name to be ready +9ms
  testcontainers DEBUG Waiting for host port 51072 for 17bdac18a64d5d5598f6b38978b73469676d9ce1449b22e6340ab7e7fb4003b7 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for 17bdac18a64d5d5598f6b38978b73469676d9ce1449b22e6340ab7e7fb4003b7 +0ms
  testcontainers DEBUG Host port 51072 ready for 17bdac18a64d5d5598f6b38978b73469676d9ce1449b22e6340ab7e7fb4003b7 +1ms
  testcontainers DEBUG Internal port 8080 ready for 17bdac18a64d5d5598f6b38978b73469676d9ce1449b22e6340ab7e7fb4003b7 +2s
  testcontainers INFO  Container custom_container_name is ready +0ms
  testcontainers INFO  DockerCompose environment started: custom_container_name +0ms
  testcontainers INFO  Downing DockerCompose environment +84ms
  testcontainers INFO  Downed DockerCompose environment +285ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-c8cb3bf9d5eeff738e55b870acd41d2b +1ms
  testcontainers INFO  Upping DockerCompose environment +0ms
  testcontainers INFO  Upped DockerCompose environment +408ms
  testcontainers INFO  Started the following containers: /testcontainers-c8cb3bf9d5eeff738e55b870acd41d2b-container-1 +7ms
  testcontainers INFO  Waiting for container container-1 to be ready +8ms
  testcontainers DEBUG Waiting for host port 51079 for 3f81cf89dd3b82027790481fe2aedecee3e8dc5824889813fe77d111576de26b +1ms
  testcontainers DEBUG Waiting for internal port 8080 for 3f81cf89dd3b82027790481fe2aedecee3e8dc5824889813fe77d111576de26b +0ms
  testcontainers DEBUG Host port 51079 ready for 3f81cf89dd3b82027790481fe2aedecee3e8dc5824889813fe77d111576de26b +1ms
  testcontainers DEBUG Internal port 8080 ready for 3f81cf89dd3b82027790481fe2aedecee3e8dc5824889813fe77d111576de26b +2s
  testcontainers INFO  Container container-1 is ready +0ms
  testcontainers INFO  DockerCompose environment started: container-1 +0ms
  testcontainers ERROR Cannot get container "container_1" as it is not running +0ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-f6b4727834ef1f5926fb784be9bc8707 +3ms
  testcontainers INFO  Upping DockerCompose environment +0ms
  testcontainers INFO  Upped DockerCompose environment +576ms
  testcontainers INFO  Started the following containers: /testcontainers-f6b4727834ef1f5926fb784be9bc8707-container-1, /testcontainers-f6b4727834ef1f5926fb784be9bc8707-another_container-1 +8ms
  testcontainers INFO  Waiting for container container-1 to be ready +10ms
  testcontainers DEBUG Waiting for host port 51084 for 678ba83cf1a5911cbe169c15558c480636c2be327398700d06395bb0b2c4404f +0ms
  testcontainers DEBUG Waiting for internal port 8080 for 678ba83cf1a5911cbe169c15558c480636c2be327398700d06395bb0b2c4404f +1ms
  testcontainers DEBUG Host port 51084 ready for 678ba83cf1a5911cbe169c15558c480636c2be327398700d06395bb0b2c4404f +0ms
  testcontainers INFO  Waiting for container another_container-1 to be ready +1ms
  testcontainers DEBUG Waiting for host port 51083 for d626e6f4fa52c3e5243089219f21a7275d98390e874dc6bb87342a4052631388 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for d626e6f4fa52c3e5243089219f21a7275d98390e874dc6bb87342a4052631388 +0ms
  testcontainers DEBUG Host port 51083 ready for d626e6f4fa52c3e5243089219f21a7275d98390e874dc6bb87342a4052631388 +1ms
  testcontainers DEBUG Internal port 8080 ready for d626e6f4fa52c3e5243089219f21a7275d98390e874dc6bb87342a4052631388 +2s
  testcontainers INFO  Container another_container-1 is ready +1ms
  testcontainers DEBUG Internal port 8080 ready for 678ba83cf1a5911cbe169c15558c480636c2be327398700d06395bb0b2c4404f +2ms
  testcontainers INFO  Container container-1 is ready +0ms
  testcontainers INFO  DockerCompose environment started: container-1, another_container-1 +0ms
  testcontainers ERROR Cannot get container "container_1" as it is not running +1ms
  testcontainers ERROR Cannot get container "another_container_1" as it is not running +0ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-b4043df30d7e73f3fb829d69b4ce44f2 +4ms
  testcontainers INFO  Upping DockerCompose environment +0ms
  testcontainers INFO  Upped DockerCompose environment +425ms
  testcontainers INFO  Started the following containers: /custom_container_name +10ms
  testcontainers INFO  Waiting for container custom_container_name to be ready +12ms
  testcontainers DEBUG Waiting for log message "unexpected" +0ms
  testcontainers ERROR Log message "unexpected" not received after 0ms for 458145879e334c6c221e756977c6eb5a224675635482eca32a2d33b24966afde +3ms
  testcontainers ERROR Container custom_container_name failed to be ready: Error: Log message "unexpected" not received after 0ms for 458145879e334c6c221e756977c6eb5a224675635482eca32a2d33b24966afde +0ms
  testcontainers INFO  Downing DockerCompose environment +1ms
  testcontainers INFO  Downed DockerCompose environment +286ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-0347d098d06407ec8b55660d40063266 +12ms
  testcontainers INFO  Upping DockerCompose environment +1ms
  testcontainers INFO  Upped DockerCompose environment +433ms
  testcontainers INFO  Started the following containers: /testcontainers-0347d098d06407ec8b55660d40063266-container-1 +10ms
  testcontainers INFO  Waiting for container container-1 to be ready +9ms
  testcontainers DEBUG Waiting for host port 51094 for df7b64adb5129df7ec8509f1ae3391516fc1e8db33f676c8113b3385a03def6c +1ms
  testcontainers DEBUG Waiting for internal port 8080 for df7b64adb5129df7ec8509f1ae3391516fc1e8db33f676c8113b3385a03def6c +0ms
  testcontainers DEBUG Host port 51094 ready for df7b64adb5129df7ec8509f1ae3391516fc1e8db33f676c8113b3385a03def6c +1ms
  testcontainers ERROR Container container-1 failed to be ready: Error: Port 8080 not bound after 0ms for df7b64adb5129df7ec8509f1ae3391516fc1e8db33f676c8113b3385a03def6c +222ms
  testcontainers INFO  Downing DockerCompose environment +0ms
  testcontainers INFO  Downed DockerCompose environment +256ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-57e288366d4273cfa4d461a41ffbea3a +17ms
  testcontainers INFO  Upping DockerCompose environment +0ms
  testcontainers INFO  Upped DockerCompose environment +422ms
  testcontainers INFO  Started the following containers: /testcontainers-57e288366d4273cfa4d461a41ffbea3a-container-1 +9ms
  testcontainers INFO  Waiting for container container-1 to be ready +11ms
  testcontainers DEBUG Waiting for host port 51100 for 1ecdcd227edb195d07cafb581bb304c5ca38b43ec8058e62af09381b72151ec9 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for 1ecdcd227edb195d07cafb581bb304c5ca38b43ec8058e62af09381b72151ec9 +0ms
  testcontainers DEBUG Host port 51100 ready for 1ecdcd227edb195d07cafb581bb304c5ca38b43ec8058e62af09381b72151ec9 +1ms
  testcontainers DEBUG Internal port 8080 ready for 1ecdcd227edb195d07cafb581bb304c5ca38b43ec8058e62af09381b72151ec9 +2s
  testcontainers INFO  Container container-1 is ready +0ms
  testcontainers INFO  DockerCompose environment started: container-1 +0ms
  testcontainers ERROR Cannot get container "container_1" as it is not running +0ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-11b5b86ee640d4f07458e154381bbd2e +1ms
  testcontainers INFO  Upping DockerCompose environment +0ms
  testcontainers INFO  Upped DockerCompose environment +457ms
  testcontainers INFO  Started the following containers: /testcontainers-11b5b86ee640d4f07458e154381bbd2e-container-1 +11ms
  testcontainers INFO  Waiting for container container-1 to be ready +11ms
  testcontainers DEBUG Waiting for host port 51104 for 1584777185da94a11a69d692589c8bef1fc8a7669a34252ab1be9de507c2db21 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for 1584777185da94a11a69d692589c8bef1fc8a7669a34252ab1be9de507c2db21 +1ms
  testcontainers DEBUG Host port 51104 ready for 1584777185da94a11a69d692589c8bef1fc8a7669a34252ab1be9de507c2db21 +0ms
  testcontainers DEBUG Internal port 8080 ready for 1584777185da94a11a69d692589c8bef1fc8a7669a34252ab1be9de507c2db21 +2s
  testcontainers INFO  Container container-1 is ready +0ms
  testcontainers INFO  DockerCompose environment started: container-1 +0ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-842700fa2fbea2a0f7cb1a4f599fe478 +0ms
  testcontainers INFO  Upping DockerCompose environment +1ms
  testcontainers INFO  Upped DockerCompose environment +507ms
  testcontainers INFO  Started the following containers: /testcontainers-842700fa2fbea2a0f7cb1a4f599fe478-container-1 +17ms
  testcontainers INFO  Waiting for container container-1 to be ready +15ms
  testcontainers DEBUG Waiting for host port 51108 for 7076b9f03f1abc6cd033d22eebedf8a4077b62ecbb30a3c7bdd8c924b8fa6983 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for 7076b9f03f1abc6cd033d22eebedf8a4077b62ecbb30a3c7bdd8c924b8fa6983 +1ms
  testcontainers DEBUG Host port 51108 ready for 7076b9f03f1abc6cd033d22eebedf8a4077b62ecbb30a3c7bdd8c924b8fa6983 +2ms
  testcontainers DEBUG Internal port 8080 ready for 7076b9f03f1abc6cd033d22eebedf8a4077b62ecbb30a3c7bdd8c924b8fa6983 +2s
  testcontainers INFO  Container container-1 is ready +1ms
  testcontainers INFO  DockerCompose environment started: container-1 +0ms
  testcontainers INFO  Stopping DockerCompose environment +0ms
  testcontainers INFO  Stopped DockerCompose environment +236ms
  testcontainers INFO  Downing DockerCompose environment +1ms
  testcontainers INFO  Downed DockerCompose environment +294ms
  testcontainers INFO  Downing DockerCompose environment +1ms
  testcontainers INFO  Downed DockerCompose environment +122ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-b5ab2435efed0e4641ff0eb8411a5c70 +1ms
  testcontainers INFO  Upping DockerCompose environment +0ms
  testcontainers INFO  Upped DockerCompose environment +422ms
  testcontainers INFO  Started the following containers: /testcontainers-b5ab2435efed0e4641ff0eb8411a5c70-container-1 +24ms
  testcontainers INFO  Waiting for container container-1 to be ready +12ms
  testcontainers DEBUG Waiting for host port 51118 for 2d63e02454c4570951071af1799e6fe5f721e6a87fdf7c809cd33c8887cc24bb +1ms
  testcontainers DEBUG Waiting for internal port 8080 for 2d63e02454c4570951071af1799e6fe5f721e6a87fdf7c809cd33c8887cc24bb +0ms
  testcontainers DEBUG Host port 51118 ready for 2d63e02454c4570951071af1799e6fe5f721e6a87fdf7c809cd33c8887cc24bb +0ms
  testcontainers DEBUG Internal port 8080 ready for 2d63e02454c4570951071af1799e6fe5f721e6a87fdf7c809cd33c8887cc24bb +2s
  testcontainers INFO  Container container-1 is ready +0ms
  testcontainers INFO  DockerCompose environment started: container-1 +0ms
  testcontainers INFO  Downing DockerCompose environment +0ms
  testcontainers INFO  Downed DockerCompose environment +295ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-63ac12d4533541ee0d3d6d3cf75bd009 +5ms
  testcontainers INFO  Upping DockerCompose environment +0ms
  testcontainers INFO  Upped DockerCompose environment +443ms
  testcontainers INFO  Started the following containers: /testcontainers-63ac12d4533541ee0d3d6d3cf75bd009-container-1 +9ms
  testcontainers INFO  Waiting for container container-1 to be ready +18ms
  testcontainers INFO  Container container-1 is ready +0ms
  testcontainers INFO  DockerCompose environment started: container-1 +0ms
  testcontainers INFO  Downing DockerCompose environment +1ms
  testcontainers INFO  Downed DockerCompose environment +297ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-76883937bef353ee0b7e0f26ae79e52f +1ms
  testcontainers INFO  Upping DockerCompose environment +1ms
  testcontainers INFO  Upped DockerCompose environment +564ms
  testcontainers INFO  Started the following containers: /testcontainers-76883937bef353ee0b7e0f26ae79e52f-container-1, /testcontainers-76883937bef353ee0b7e0f26ae79e52f-another_container-1 +10ms
  testcontainers INFO  Waiting for container another_container-1 to be ready +16ms
  testcontainers DEBUG Waiting for host port 51128 for 46e6b7e7f27fcf70cd0ec6f89bdbc86507c7d5455bfefe442610b45126271dd0 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for 46e6b7e7f27fcf70cd0ec6f89bdbc86507c7d5455bfefe442610b45126271dd0 +0ms
  testcontainers DEBUG Host port 51128 ready for 46e6b7e7f27fcf70cd0ec6f89bdbc86507c7d5455bfefe442610b45126271dd0 +1ms
  testcontainers INFO  Waiting for container container-1 to be ready +1ms
  testcontainers DEBUG Waiting for host port 51131 for 6b25f107bee1c5b790dfb7bd47893e6bd02936dfd02eb897dcb89256fa7650cc +0ms
  testcontainers DEBUG Waiting for internal port 8080 for 6b25f107bee1c5b790dfb7bd47893e6bd02936dfd02eb897dcb89256fa7650cc +0ms
  testcontainers DEBUG Host port 51131 ready for 6b25f107bee1c5b790dfb7bd47893e6bd02936dfd02eb897dcb89256fa7650cc +4ms
  testcontainers DEBUG Internal port 8080 ready for 6b25f107bee1c5b790dfb7bd47893e6bd02936dfd02eb897dcb89256fa7650cc +2s
  testcontainers INFO  Container container-1 is ready +0ms
  testcontainers DEBUG Internal port 8080 ready for 46e6b7e7f27fcf70cd0ec6f89bdbc86507c7d5455bfefe442610b45126271dd0 +20ms
  testcontainers INFO  Container another_container-1 is ready +0ms
  testcontainers INFO  DockerCompose environment started: container-1, another_container-1 +0ms
  testcontainers ERROR Cannot get container "container_1" as it is not running +1ms
  testcontainers ERROR Cannot get container "another_container_1" as it is not running +0ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-0e3c4248a0f88d71793fb7bcb2daafce +7ms
  testcontainers INFO  Upping DockerCompose environment +0ms
  testcontainers INFO  Upped DockerCompose environment +446ms
  testcontainers INFO  Started the following containers: /testcontainers-0e3c4248a0f88d71793fb7bcb2daafce-container-1 +16ms
  testcontainers INFO  Waiting for container container-1 to be ready +19ms
  testcontainers DEBUG Waiting for host port 51134 for 022178c77f3064107ad13f431b4c8f56724f26886463beb0bd05f06fc150a90f +0ms
  testcontainers DEBUG Waiting for internal port 8080 for 022178c77f3064107ad13f431b4c8f56724f26886463beb0bd05f06fc150a90f +1ms
  testcontainers DEBUG Host port 51134 ready for 022178c77f3064107ad13f431b4c8f56724f26886463beb0bd05f06fc150a90f +2ms
  testcontainers DEBUG Internal port 8080 ready for 022178c77f3064107ad13f431b4c8f56724f26886463beb0bd05f06fc150a90f +2s
  testcontainers INFO  Container container-1 is ready +1ms
  testcontainers INFO  DockerCompose environment started: container-1 +0ms
  testcontainers ERROR Cannot get container "container_1" as it is not running +0ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-4faed03b92e9d9480554cbc797777a32 +4ms
  testcontainers INFO  Upping DockerCompose environment +1ms
  testcontainers INFO  Upped DockerCompose environment +666ms
  testcontainers INFO  Started the following containers: /testcontainers-4faed03b92e9d9480554cbc797777a32-another_container-1, /testcontainers-4faed03b92e9d9480554cbc797777a32-container-1 +24ms
  testcontainers INFO  Waiting for container another_container-1 to be ready +17ms
  testcontainers DEBUG Waiting for host port 51138 for 2ed684a1e122e22d23de41bafa779017879b6485a29b6621f47c634586307c99 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for 2ed684a1e122e22d23de41bafa779017879b6485a29b6621f47c634586307c99 +0ms
  testcontainers DEBUG Host port 51138 ready for 2ed684a1e122e22d23de41bafa779017879b6485a29b6621f47c634586307c99 +1ms
  testcontainers INFO  Waiting for container container-1 to be ready +1ms
  testcontainers DEBUG Waiting for host port 51139 for f33d813b12be4c8c8cc3e23697691e84be9ad1245f25787c620272dbfbbebe0d +0ms
  testcontainers DEBUG Waiting for internal port 8080 for f33d813b12be4c8c8cc3e23697691e84be9ad1245f25787c620272dbfbbebe0d +0ms
  testcontainers DEBUG Host port 51139 ready for f33d813b12be4c8c8cc3e23697691e84be9ad1245f25787c620272dbfbbebe0d +5ms
  testcontainers DEBUG Internal port 8080 ready for 2ed684a1e122e22d23de41bafa779017879b6485a29b6621f47c634586307c99 +2s
  testcontainers INFO  Container another_container-1 is ready +0ms
  testcontainers DEBUG Internal port 8080 ready for f33d813b12be4c8c8cc3e23697691e84be9ad1245f25787c620272dbfbbebe0d +29ms
  testcontainers INFO  Container container-1 is ready +0ms
  testcontainers INFO  DockerCompose environment started: another_container-1, container-1 +0ms
  testcontainers ERROR Cannot get container "non_existent_container" as it is not running +1ms
  testcontainers INFO  Downing DockerCompose environment +8ms
  testcontainers INFO  Downed DockerCompose environment +453ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-5ff3bf0891cf9e22f73420698a6f867b +8ms
  testcontainers INFO  Upping DockerCompose environment +1ms
  testcontainers INFO  Upped DockerCompose environment +447ms
  testcontainers INFO  Started the following containers: /testcontainers-5ff3bf0891cf9e22f73420698a6f867b-service_2-1 +15ms
  testcontainers INFO  Waiting for container service_2-1 to be ready +13ms
  testcontainers DEBUG Waiting for host port 51146 for 0d37ff4074cc70dda4b386e16c26cce4f45367ec50f9297d3541e9f2cd2bdde3 +1ms
  testcontainers DEBUG Waiting for internal port 8080 for 0d37ff4074cc70dda4b386e16c26cce4f45367ec50f9297d3541e9f2cd2bdde3 +0ms
  testcontainers DEBUG Host port 51146 ready for 0d37ff4074cc70dda4b386e16c26cce4f45367ec50f9297d3541e9f2cd2bdde3 +1ms
  testcontainers DEBUG Internal port 8080 ready for 0d37ff4074cc70dda4b386e16c26cce4f45367ec50f9297d3541e9f2cd2bdde3 +2s
  testcontainers INFO  Container service_2-1 is ready +0ms
  testcontainers INFO  DockerCompose environment started: service_2-1 +0ms
  testcontainers ERROR Cannot get container "service_2_1" as it is not running +0ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-node +1ms
  testcontainers INFO  Upping DockerCompose environment +0ms
  testcontainers INFO  Upped DockerCompose environment +476ms
  testcontainers INFO  Started the following containers: /custom_container_name +17ms
  testcontainers INFO  Waiting for container custom_container_name to be ready +13ms
  testcontainers DEBUG Waiting for host port 51150 for 19b7cb7cdfa02ccc7d7a66596e2fdb2b399620b38caf5a97ff28d38da7b38188 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for 19b7cb7cdfa02ccc7d7a66596e2fdb2b399620b38caf5a97ff28d38da7b38188 +0ms
  testcontainers DEBUG Host port 51150 ready for 19b7cb7cdfa02ccc7d7a66596e2fdb2b399620b38caf5a97ff28d38da7b38188 +1ms
  testcontainers DEBUG Internal port 8080 ready for 19b7cb7cdfa02ccc7d7a66596e2fdb2b399620b38caf5a97ff28d38da7b38188 +2s
  testcontainers INFO  Container custom_container_name is ready +0ms
  testcontainers INFO  DockerCompose environment started: custom_container_name +0ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-node +0ms
  testcontainers INFO  Upping DockerCompose environment +1ms
  testcontainers INFO  Upped DockerCompose environment +142ms
  testcontainers INFO  Started the following containers: /custom_container_name +13ms
  testcontainers INFO  Waiting for container custom_container_name to be ready +12ms
  testcontainers DEBUG Waiting for host port 51150 for 19b7cb7cdfa02ccc7d7a66596e2fdb2b399620b38caf5a97ff28d38da7b38188 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for 19b7cb7cdfa02ccc7d7a66596e2fdb2b399620b38caf5a97ff28d38da7b38188 +1ms
  testcontainers DEBUG Host port 51150 ready for 19b7cb7cdfa02ccc7d7a66596e2fdb2b399620b38caf5a97ff28d38da7b38188 +1ms
  testcontainers DEBUG Internal port 8080 ready for 19b7cb7cdfa02ccc7d7a66596e2fdb2b399620b38caf5a97ff28d38da7b38188 +219ms
  testcontainers INFO  Container custom_container_name is ready +0ms
  testcontainers INFO  DockerCompose environment started: custom_container_name +0ms
  testcontainers INFO  Downing DockerCompose environment +0ms
  testcontainers INFO  Downed DockerCompose environment +321ms
  testcontainers INFO  Downing DockerCompose environment +0ms
  testcontainers INFO  Downed DockerCompose environment +117ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-60d81e2ec7dbf252305de1cded140bf7 +1ms
  testcontainers INFO  Upping DockerCompose environment +0ms
  testcontainers INFO  Upped DockerCompose environment +436ms
  testcontainers INFO  Started the following containers: /testcontainers-60d81e2ec7dbf252305de1cded140bf7-container-1 +20ms
  testcontainers INFO  Waiting for container container-1 to be ready +13ms
  testcontainers DEBUG Waiting for host port 51161 for a1bc85c2a178765f7f12d34d4f75bf89992621342d7e3862bec242412807bc23 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for a1bc85c2a178765f7f12d34d4f75bf89992621342d7e3862bec242412807bc23 +0ms
  testcontainers DEBUG Host port 51161 ready for a1bc85c2a178765f7f12d34d4f75bf89992621342d7e3862bec242412807bc23 +6ms
  testcontainers DEBUG Internal port 8080 ready for a1bc85c2a178765f7f12d34d4f75bf89992621342d7e3862bec242412807bc23 +1s
  testcontainers INFO  Container container-1 is ready +0ms
  testcontainers INFO  DockerCompose environment started: container-1 +0ms
  testcontainers ERROR Cannot get container "container_1" as it is not running +0ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-9bc7f4dbf24142bef8814357b2649b11 +1ms
  testcontainers INFO  Upping DockerCompose environment +1ms
  testcontainers INFO  Upped DockerCompose environment +474ms
  testcontainers INFO  Started the following containers: /testcontainers-9bc7f4dbf24142bef8814357b2649b11-container-1 +21ms
  testcontainers INFO  Waiting for container container-1 to be ready +14ms
  testcontainers DEBUG Waiting for host port 51165 for adcc7ef0bb60e6cdb5b83cfe11e9c1755bcea41d981b9bdb90e71cf69b0c9cb0 +0ms
  testcontainers DEBUG Waiting for internal port 8080 for adcc7ef0bb60e6cdb5b83cfe11e9c1755bcea41d981b9bdb90e71cf69b0c9cb0 +0ms
  testcontainers DEBUG Host port 51165 ready for adcc7ef0bb60e6cdb5b83cfe11e9c1755bcea41d981b9bdb90e71cf69b0c9cb0 +1ms
  testcontainers DEBUG Internal port 8080 ready for adcc7ef0bb60e6cdb5b83cfe11e9c1755bcea41d981b9bdb90e71cf69b0c9cb0 +2s
  testcontainers INFO  Container container-1 is ready +1ms
  testcontainers INFO  DockerCompose environment started: container-1 +1ms
  testcontainers ERROR Cannot get container "container_1" as it is not running +0ms
  testcontainers INFO  Starting DockerCompose environment: testcontainers-56236007d08afe44b1755f17f3df5cae +3ms
  testcontainers INFO  Upping DockerCompose environment +0ms
  testcontainers INFO  Upped DockerCompose environment +564ms
  testcontainers INFO  Started the following containers: /testcontainers-56236007d08afe44b1755f17f3df5cae-another_container-1, /testcontainers-56236007d08afe44b1755f17f3df5cae-container-1 +24ms
  testcontainers INFO  Waiting for container container-1 to be ready +14ms
  testcontainers DEBUG Waiting for host port 51169 for d90c9fa52051beb4342c262f022557ab1449ad184fc5aa153a73dc86275d27c6 +1ms
  testcontainers DEBUG Waiting for internal port 8080 for d90c9fa52051beb4342c262f022557ab1449ad184fc5aa153a73dc86275d27c6 +0ms
  testcontainers DEBUG Host port 51169 ready for d90c9fa52051beb4342c262f022557ab1449ad184fc5aa153a73dc86275d27c6 +0ms
  testcontainers INFO  Waiting for container another_container-1 to be ready +4ms
  testcontainers DEBUG Waiting for host port 51170 for b45f5dce0ab4b4a113f4a4cd08923649f452a02f02482fc34a08e700b250c12a +0ms
  testcontainers DEBUG Waiting for internal port 8080 for b45f5dce0ab4b4a113f4a4cd08923649f452a02f02482fc34a08e700b250c12a +0ms
  testcontainers DEBUG Host port 51170 ready for b45f5dce0ab4b4a113f4a4cd08923649f452a02f02482fc34a08e700b250c12a +4ms
  testcontainers DEBUG Internal port 8080 ready for d90c9fa52051beb4342c262f022557ab1449ad184fc5aa153a73dc86275d27c6 +2s
  testcontainers INFO  Container container-1 is ready +0ms
  testcontainers DEBUG Internal port 8080 ready for b45f5dce0ab4b4a113f4a4cd08923649f452a02f02482fc34a08e700b250c12a +19ms
  testcontainers INFO  Container another_container-1 is ready +0ms
  testcontainers INFO  DockerCompose environment started: another_container-1, container-1 +0ms
  testcontainers ERROR Cannot get container "container_1" as it is not running +0ms
  testcontainers ERROR Cannot get container "another_container_1" as it is not running +1ms

Steps to Reproduce

  1. Run the tests using npm run test in a mac machine with m1 chip
  2. Should see failures as below

Environment Information

Additional comments This does not really affect this package as a whole, and are more of a developer experience improvement for those using M1 machines.

Regarding most of the image not found error, most likely the cause is due to M1 having a arm64 as its architecture string identifier, and as such when it attempts to look for it in the docker registry it fails. In fact, I believe that most error happens only because the image for arm64 is not found (as far as I knowaarch64 is arm64, but I think docker for mac does not automatically associate the both as the same. https://stackoverflow.com/questions/31851611/differences-between-arm64-and-aarch64)

Actually not quite sure if this package should even handle this issue, or this should be reported here. Feel free to close this if its not relevant.

Tested on windows machine on WSL2, and all the tests run fine (except for tests involving private registry)

cristianrgreco commented 2 years ago

Thanks for raising @cwkang1998, I've been dealing with this issue locally for a few months as well. I was hoping that this would fix itself as image authors create builds for both architectures over time. Any ideas for getting this working now without changing to non-official images are appreciated!

laat commented 2 years ago

To get this to work on M1:

const container = await new MySqlContainer('mysql:5.7.32').start();

I had to pull the image manually, on the linux/x86_64 platform:

docker pull --platform linux/x86_64 mysql:5.7.32