我配置了bitbucket-pipelines.yml并使用了image: gradle:6.3.0-jdk11
。我的项目基于Java11和Gradle 6.3。一切正常,直到开始测试用例为止。因为我使用Testontainers来测试应用程序。 Bitbucket无法启动Testcontainer。错误是:org.testcontainers.containers.ContainerLaunchException: Container startup failed
如何解决此问题?
如果在Bitbucket管道中使用了Testcontainer,则可能存在一些问题。例如,上面提到的一些问题。通过将以下命令放入bitbucket-pipelines.yml
pipelines:
default:
- step:
script:
- export TESTCONTAINERS_RYUK_DISABLED=true
- mvn clean install
services:
- docker
definitions:
services:
docker:
memory: 2048