add example commands for docker-env FAQ

pull/13341/head
Steven Powell 2022-01-12 15:00:08 -08:00
parent 3edd561de7
commit a64c35ad32
1 changed files with 28 additions and 0 deletions

View File

@ -34,6 +34,34 @@ minikube profiles are meant to be isolated from one another, with their own sett
minikube's VM includes a Docker daemon running inside Linux for free, so you can use
`minikube docker-env` to point your terminal's Docker CLI to the Docker inside minikube.
{{% tabs %}}
{{% tab "bash/zsh" %}}
```
eval $(minikube -p <profile> docker-env)
```
{{% /tab %}}
{{% tab PowerShell %}}
```
& minikube -p <profile> docker-env --shell powershell | Invoke-Expression
```
{{% /tab %}}
{{% tab cmd %}}
```
@FOR /f "tokens=*" %i IN ('minikube -p <profile> docker-env --shell cmd') DO @%i
```
{{% /tab %}}
{{% tab fish %}}
```
minikube -p <profile> docker-env | source
```
{{% /tab %}}
{{% tab tcsh %}}
```
eval `minikube -p <profile> docker-env`
```
{{% /tab %}}
{{% /tabs %}}
Note: this only works with the "docker" container runtime, not with e.g. "containerd"
You would need to start minikube with a VM driver, instead of docker, such as hyperkit on macOS and Hyper-V on Windows.