1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-21 11:27:32 +00:00

bump docker version 25.x.x & compatible code change

This commit is contained in:
Krunal Hingu
2025-05-09 13:54:31 +05:30
parent 5756a3837a
commit 75f3569eb9
7 changed files with 177 additions and 1062 deletions

View File

@@ -123,8 +123,12 @@ func RmoveDindContainer(ctx context.Context, dindAddress string) error {
}
timeout := 2 * time.Minute
if err := cli.ContainerStop(ctx, containerName, &timeout); err != nil {
return fmt.Errorf("Failed to stop dind container [%s] on host [%s]: %v", containerName, cli.DaemonHost(), err)
timeoutSeconds := int(timeout.Seconds())
if err := cli.ContainerStop(ctx, containerName, container.StopOptions{
Timeout: &timeoutSeconds,
}); err != nil {
return fmt.Errorf("failed to stop dind container [%s] on host [%s]: %v", containerName, cli.DaemonHost(), err)
}
logrus.Infof("waiting 1 minute before removing container [%s] on host [%s]", containerName, cli.DaemonHost())
@@ -137,7 +141,7 @@ func RmoveDindContainer(ctx context.Context, dindAddress string) error {
logrus.Debugf("[remove/%s] Container doesn't exist on host [%s]", containerName, cli.DaemonHost())
return nil
}
return fmt.Errorf("Failed to remove dind container [%s] on host [%s]: %v", containerName, cli.DaemonHost(), err)
return fmt.Errorf("failed to remove dind container [%s] on host [%s]: %v", containerName, cli.DaemonHost(), err)
}
logrus.Infof("[%s] Successfully Removed dind container [%s] on host [%s]", DINDPlane, containerName, cli.DaemonHost())
return nil