add to registry

pull/7984/head
Medya Gh 2020-05-02 20:19:17 -07:00
parent e5c8592fdd
commit d887259153
3 changed files with 15 additions and 9 deletions

View File

@ -160,7 +160,7 @@ func runStart(cmd *cobra.Command, args []string) {
out.ErrLn("")
out.ErrT(out.Conflict, "Your Docker Desktop container os type is Windows but Linux is required.")
out.T(out.Warning, "Please change Docker settings to use Linux containers instead of Windows containers.")
out.T(out.Documentation, "https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers")
out.T(out.Documentation, "https://minikube.sigs.k8s.io/docs/drivers/docker/#verify-docker-container-type-is-linux")
exit.UsageT(`You can verify your Docker container type by running:
{{.command}}
`, out.V{"command": "docker info --format '{{.OSType}}'"})

View File

@ -81,9 +81,13 @@ func status() registry.State {
defer cancel()
// Quickly returns an error code if server is not running
cmd := exec.CommandContext(ctx, oci.Docker, "version", "--format", "{{.Server.Version}}")
cmd := exec.CommandContext(ctx, oci.Docker, "version", "--format", "{{.Server.Os}}-{{.Server.Version}}")
o, err := cmd.Output()
output := string(o)
if !strings.Contains(output,"windows-") {
return registry.State{Error: oci.ErrWindowsContainers, Installed: true, Healthy: false, Fix: "Change container type to \"linux\" in Docker Desktop settings", Doc: docURL+"#verify-docker-container-type-is-linux"}
}
if err == nil {
glog.Infof("docker version: %s", output)
return registry.State{Installed: true, Healthy: true}

View File

@ -30,16 +30,18 @@ The Docker driver allows you to install Kubernetes into an existing Docker insta
## Troubleshooting
- On macOS or Windows, you may need to restart Docker for Desktop if a command gets hung
- Run `--alsologtostderr -v=1` for extra debugging information
[comment]: <> (this title is used in the docs links, don't change)
### Verify Docker container type is Linux
- On Windows, make sure Docker Desktop's container type setting is Linux and not windows. see docker docs on [switching container type](https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers).
You can verify your Docker container type by running:
```shell
docker info --format '{{.OSType}}'
```
```shell
docker info --format '{{.OSType}}'
```
### Run with logs
- Run `--alsologtostderr -v=1` for extra debugging information
### Deploying MySql on a linux with AppArmor
- On Linux, if you want to run MySQL pod, you need to disable AppArmor for mysql profile
If your docker has [AppArmor](https://wiki.ubuntu.com/AppArmor) enabled, running mysql in privileged mode with docker driver will have the issue [#7401](https://github.com/kubernetes/minikube/issues/7401).