Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to evaluate output of docker-env: Command 'docker' not found #4089

Closed
staticdev opened this issue Apr 12, 2019 · 10 comments
Closed

Unable to evaluate output of docker-env: Command 'docker' not found #4089

staticdev opened this issue Apr 12, 2019 · 10 comments
Labels
co/docker-env docker-env issues kind/documentation Categorizes issue or PR as related to documentation. triage/unresolved Indicates an issue that can not or will not be resolved.

Comments

@staticdev
Copy link
Contributor

Fresh installed minikube on Ubuntu 18.10:

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
  && chmod +x minikube
sudo cp minikube /usr/local/bin && rm minikube
  • How to reproduce the error (just 3 commands):
    minikube start

😄 minikube v1.0.0 on linux (amd64)
🤹 Downloading Kubernetes v1.14.0 images in the background ...
💡 Tip: Use 'minikube start -p ' to create a new cluster, or 'minikube delete' to delete this one.
🏃 Re-using the currently running virtualbox VM for "minikube" ...
⌛ Waiting for SSH access ...
📶 "minikube" IP address is 192.168.99.100
🐳 Configuring Docker as the container runtime ...
🐳 Version of container runtime is 18.06.2-ce
⌛ Waiting for image downloads to complete ...
✨ Preparing Kubernetes environment ...
🚜 Pulling images required by Kubernetes v1.14.0 ...
🔄 Relaunching Kubernetes v1.14.0 using kubeadm ...
⌛ Waiting for pods: apiserver proxy etcd scheduler controller dns
📯 Updating kube-proxy configuration ...
🤔 Verifying component health .....
💗 kubectl is now configured to use "minikube"
🏄 Done! Thank you for using minikube!

eval $(minikube docker-env)
docker ps

I get in respose:

Command 'docker' not found, but can be installed with:

sudo snap install docker # version 18.06.1-ce, or
sudo apt install docker.io

See 'snap info docker' for additional versions.

@staticdev staticdev changed the title [1.0.0] Fresh install docker not found [1.0.0] Fresh install docker not found following the documentation Apr 12, 2019
@staticdev
Copy link
Contributor Author

I've confirmed docker is a requirement to run minikube. So it is a documentation issue.

@afbjorklund
Copy link
Collaborator

You need a container runtime, there are several to choose from. Docker is the default.

@afbjorklund afbjorklund added the kind/documentation Categorizes issue or PR as related to documentation. label Apr 13, 2019
@afbjorklund
Copy link
Collaborator

afbjorklund commented Apr 13, 2019

Note that what we document is installing kubectl, and using that to talk to the cluster.
Using docker and docker-env is an advanced topic, and not available everywhere...

As a workaround you can use minikube ssh, and then run the commands on the VM ?
But anyway, you don't absolutely need a docker client - but should be documented anyway.

@afbjorklund afbjorklund added the co/docker-env docker-env issues label Apr 13, 2019
@staticdev
Copy link
Contributor Author

staticdev commented Apr 13, 2019

I think there should be something like:

"

Install a container runtime

Docker is the most common choice, but minikube also works with containerd. CRI-O and rkt.
"

On this page even before install kubectl or hypervisor since the main purpose is container orchestration and minikube doesn't come by default with a runtime.

I didn't find this documentation on github to make a pull request.

@afbjorklund
Copy link
Collaborator

Well, there is a runtime (or three) on the VM - it just doesn't come with a local runtime ? What could be needed, however, is a better way to build new images, than doing it directly on the control plane node.

The current approach is more of a hack, and I guess it could mention that you need to install docker:
https://github.com/kubernetes/minikube/blob/master/docs/reusing_the_docker_daemon.md

(Mirrored at: https://kubernetes.io/docs/setup/minikube/#use-local-images-by-re-using-the-docker-daemon)

As long as we recommend that approach, we should add a link to: https://docs.docker.com/install/
And probably mention that you only need the Docker client, not the entire daemon and everything.

@afbjorklund
Copy link
Collaborator

If you want to do other interaction with the CRI directly, the recommend approach is now crictl:

$ minikube ssh -- sudo crictl ps

That will work for all of the runtimes, including Docker. But it doesn't have a local/remote client/server.

It would perhaps be interesting to see if there are any more uses of a local docker, not covered by crictl ?

@tstromberg
Copy link
Contributor

tstromberg commented Apr 16, 2019

I've confirmed docker is a requirement to run minikube. So it is a documentation issue.

As someone who does not have docker installed, I can definitely say docker is not a requirement to run minikube. It is however required for the docker-env command, which makes sense.

As afbjorklund mentions, we do however include it within the minikube VM.

@tstromberg tstromberg changed the title [1.0.0] Fresh install docker not found following the documentation docker-env: Command 'docker' not found Apr 16, 2019
@tstromberg tstromberg changed the title docker-env: Command 'docker' not found Unable to evaluate output of docker-env: Command 'docker' not found Apr 16, 2019
@tstromberg
Copy link
Contributor

Closing, as minikube doesn't actually invoke docker.

@tstromberg tstromberg added the triage/unresolved Indicates an issue that can not or will not be resolved. label Apr 16, 2019
@staticdev
Copy link
Contributor Author

staticdev commented Apr 16, 2019

@tstromberg minikube doesn't invoke docker, but it's documentation (https://kubernetes.io/docs/tasks/tools/install-minikube/) is misleading with this information without saying installing docker on the host machine is a prerequisite to run those commands...

@afbjorklund
Copy link
Collaborator

Documenting it on the docker-env page makes sense. Probably can leave the details on how, to Docker Inc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-env docker-env issues kind/documentation Categorizes issue or PR as related to documentation. triage/unresolved Indicates an issue that can not or will not be resolved.
Projects
None yet
Development

No branches or pull requests

3 participants