Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check if the container request is for the reaper #574

Merged
merged 1 commit into from
Oct 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,9 @@ func (p *DockerProvider) CreateContainer(ctx context.Context, req ContainerReque
sessionID := sessionID()

var termSignal chan bool
if !req.SkipReaper {
// the reaper does not need to start a reaper for itself
isReaperContainer := strings.EqualFold(req.Image, reaperImage(req.ReaperImage))
if !req.SkipReaper && !isReaperContainer {
r, err := NewReaper(context.WithValue(ctx, dockerHostContextKey, p.host), sessionID.String(), p, req.ReaperImage)
if err != nil {
return nil, fmt.Errorf("%w: creating reaper failed", err)
Expand All @@ -957,7 +959,7 @@ func (p *DockerProvider) CreateContainer(ctx context.Context, req ContainerReque
req.Labels[k] = v
}
}
} else {
} else if !isReaperContainer {
p.printReaperBanner("container")
}

Expand Down