Testcontainer issue with Bitbucket pipelines

三世轮回 提交于 2020-06-01 05:25:46

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/61138898/testcontainer-issue-with-bitbucket-pipelines

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!