fix: Remove volume with same name as the container again (#1203)

* Update run_context.go

* .
This commit is contained in:
ChristopherHX 2022-06-07 16:10:43 +02:00 committed by GitHub
parent 859445fb94
commit 28f5b37fd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,6 +218,7 @@ func (rc *RunContext) stopJobContainer() common.Executor {
return func(ctx context.Context) error {
if rc.JobContainer != nil && !rc.Config.ReuseContainers {
return rc.JobContainer.Remove().
Then(container.NewDockerVolumeRemoveExecutor(rc.jobContainerName(), false)).
Then(container.NewDockerVolumeRemoveExecutor(rc.jobContainerName()+"-env", false))(ctx)
}
return nil