禁用 RYUK(Go 的 Testcontainers)

huangapple go评论102阅读模式
英文:

Disable RYUK (Testcontainers for Go)

问题

我正在使用Bitbucket Pipelines来运行使用Testcontainers的Go项目测试。管道失败并显示以下消息:

Error response from daemon: authorization denied by plugin pipelines: --mounts is not allowed: creating reaper failed: failed to create container

所以我设置了export TESTCONTAINERS_RYUK_DISABLED=true,这是我从Testcontainers Java文档中找到的。但似乎没有起作用。

我正在使用go 1.19.2github.com/testcontainers/testcontainers-go v0.15.0

英文:

I'm using bitbucket pipelines to run my Go project tests that use Testcontainers.
Pipelines fail with message:

Error response from daemon: authorization denied by plugin pipelines: --mounts is not allowed: creating reaper failed: failed to create container

So I set export TESTCONTAINERS_RYUK_DISABLED=true that I found from Testcontainers Java docs. It doesn't seem to do anything.

Using go 1.19.2 and github.com/testcontainers/testcontainers-go v0.15.0

答案1

得分: 4

在这之后,我去调查了testcontainers-go的源代码,并发现我只需要在我的ContainerRequest中定义以下内容:

SkipReaper:   true,
英文:

Right after this I went to investigate testcontainers-go source code and found that that all I had to do was to define in my ContainerRequest

SkipReaper:   true,

huangapple
  • 本文由 发表于 2022年12月8日 01:15:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/74720510.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定