Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Testcontainer issue with Bitbucket pipelines

I configured bitbucket-pipelines.yml and used image: gradle:6.3.0-jdk11. My project built on Java11 and Gradle 6.3. Everything was Ok till starting test cases. Because I used Testontainers to test the application. Bitbucket could not start up the Testcontainer. The error is: org.testcontainers.containers.ContainerLaunchException: Container startup failed

How can be fixed the issue?

like image 218
Nasibulloh Yandashev Avatar asked Apr 30 '26 14:04

Nasibulloh Yandashev


1 Answers

If used Testcontainers inside the Bitbucket pipelines, There might be some issues. For instance, some issues like mentioned above. This issue can be fixed putting by following commands into bitbucket-pipelines.yml Here the basic command is an environment variable.

TESTCONTAINERS_RYUK_DISABLED=true. The full pipeline might be like this:


pipelines:
  default:
    - step:
        script:
          - export TESTCONTAINERS_RYUK_DISABLED=true
          - mvn clean install
        services:
          - docker
definitions:
  services:
    docker:
      memory: 2048
like image 57
Nasibulloh Yandashev Avatar answered May 04 '26 16:05

Nasibulloh Yandashev