mirror of
https://github.com/rancher/rke.git
synced 2025-09-01 06:56:29 +00:00
Avoid creating dangling volumes with rke tools
This commit is contained in:
committed by
Alena Prokharchyk
parent
a905a6df80
commit
556e5bb678
@@ -224,7 +224,7 @@ func UseLocalOrPull(ctx context.Context, dClient *client.Client, hostname string
|
||||
}
|
||||
|
||||
func RemoveContainer(ctx context.Context, dClient *client.Client, hostname string, containerName string) error {
|
||||
err := dClient.ContainerRemove(ctx, containerName, types.ContainerRemoveOptions{Force: true})
|
||||
err := dClient.ContainerRemove(ctx, containerName, types.ContainerRemoveOptions{Force: true, RemoveVolumes: true})
|
||||
if err != nil {
|
||||
return fmt.Errorf("Can't remove Docker container [%s] for host [%s]: %v", containerName, hostname, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user