Skip to content

none driver: support non systemd ways to restart docker #6954

Closed
@medyagh

Description

@medyagh

currently if u run none driver on a system that does have docker but it is not systemd
it wont work !

because we expect docker restart to use systemctl (and init.d scripts wont work)

// Restart restarts Docker on a host
func (r *Docker) Restart() error {
	c := exec.Command("sudo", "systemctl", "restart", "docker")
	if _, err := r.Runner.RunCmd(c); err != nil {
		return errors.Wrap(err, "restarting docker.")
	}
	return nil
}

https://github.com/kubernetes/minikube/blob/master/pkg/minikube/cruntime/docker.go#L101

we could try do restart docker service using "service restart docker" if there is no systemctl service file for docker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    co/none-driverkind/featureCategorizes issue or PR as related to a new feature.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions