Skip to content

Commit

Permalink
fix start testcontainers fail bug (#1313)
Browse files Browse the repository at this point in the history
  • Loading branch information
luky116 authored May 2, 2024
1 parent d1bec53 commit 8be70f0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/testcontainers/testcontainers.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ type TestcontainerApps struct {
// NewTestcontainerApps returns new instance of TestcontainerApps struct
func NewTestcontainerApps() *TestcontainerApps {
timestamp := time.Now().Nanosecond()
// In order to solve the problem of "creating reaper failed: failed to create container"
// refer to https://github.com/testcontainers/testcontainers-go/issues/2172
if err := os.Setenv("TESTCONTAINERS_RYUK_DISABLED", "true"); err != nil {
panic("set env failed: " + err.Error())
}
return &TestcontainerApps{
Timestamp: timestamp,
}
Expand Down

0 comments on commit 8be70f0

Please sign in to comment.