Issue with github actions + DockerComposeContainer #6296
Unanswered
igorgordonsu
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Is this a public GHA runner or a hosted runner? We run the Testcontainers test suite on GHA as well, so I'd be surprised if there are issues with public runner. Besides, you can try setting |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey!
I'm trying to run github action that runs integrations tests using testcontainers. When I'm starting up the infra via DockerComposeContainer:
static DockerComposeContainer environment;
I'm getting the following exception:
Caused by:
org.testcontainers.containers.ContainerLaunchException: Container startup failed
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:349)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
at org.testcontainers.containers.ContainerisedDockerCompose.invoke(DockerComposeContainer.java:710)
at org.testcontainers.containers.DockerComposeContainer.runWithCompose(DockerComposeContainer.java:337)
at org.testcontainers.containers.DockerComposeContainer.createServices(DockerComposeContainer.java:258)
at org.testcontainers.containers.DockerComposeContainer.start(DockerComposeContainer.java:189)
at com.philips.asp.container.mr.docker.TestContainersTest.(TestContainersTest.java:76)
I thought that it caused by some weird stuff that I'm doing in my compose file so I tried to run just a simple image of postgreSQL
got the same error.
Here is the bit edited compose file:
postgres:
image: postgres:latest
hostname: postgres
ports:
- "XXX:XXX"
environment:
POSTGRES_PASSWORD: XXXX
POSTGRES_USER: XXXX
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: XXXX
healthcheck:
test: pg_isready -U XXXX -d XXXX
interval: 10s
timeout: 5s
retries: 5
I tried to load my enviroment via GenericContainer and it worked, so my assumption that it caused by something that I don't understand with docker compose + testcontainers.
Anyhow, anyone has ideas why it's happening?
Beta Was this translation helpful? Give feedback.
All reactions