From ed1b47f552e2445d930f510a7539ed6b88361fd4 Mon Sep 17 00:00:00 2001 From: bobs-bits Date: Wed, 3 Oct 2018 23:50:42 -0400 Subject: [PATCH] Update hello-minikube.md (#10182) added powershell equivalent for eval $(minikube docker-env), and added some text to help a beginner understand in more concrete terms the difference between the local docker registry, and the one in minikube (might only be an issue for newbs, but I am a newb :) and limited to powershell :(). --- content/en/docs/tutorials/hello-minikube.md | 31 ++++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/content/en/docs/tutorials/hello-minikube.md b/content/en/docs/tutorials/hello-minikube.md index f2a79642eb..f9f8867413 100644 --- a/content/en/docs/tutorials/hello-minikube.md +++ b/content/en/docs/tutorials/hello-minikube.md @@ -160,15 +160,22 @@ This recipe for the Docker image starts from the official Node.js LTS image found in the Docker registry, exposes port 8080, copies your `server.js` file to the image and starts the Node.js server. -Because this tutorial uses Minikube, instead of pushing your Docker image to a -registry, you can simply build the image using the same Docker host as -the Minikube VM, so that the images are automatically present. To do so, make -sure you are using the Minikube Docker daemon: +By default, Docker will create images and store them in your local machine's Docker registry. +In this tutorial, we will not use your local machine's Docker registry; we will use the +Docker registry of the Docker daemon running _inside_ Minikube's vm instance. To point the +'docker' command to your Minikube's Docker daemon, type (unix shells): ```shell eval $(minikube docker-env) ``` +or in powershell: +```shell +minikube docker-env | Invoke-Expression +``` + + + {{< note >}} **Note:** Later, when you no longer wish to use the Minikube host, you can undo this change by running `eval $(minikube docker-env -u)`. @@ -180,6 +187,22 @@ Build your Docker image, using the Minikube Docker daemon (mind the trailing dot docker build -t hello-node:v1 . ``` +check that the image is in Minikube's Docker registry: + +```shell +minikube ssh docker images +``` + +Output: + +```shell +REPOSITORY TAG IMAGE ID CREATED SIZE +hello-node v1 f82485ca953c 3 minutes ago 655MB +... +node 6.9.2 faaadb4aaf9b 20 months ago 655MB +``` + + Now the Minikube VM can run the image you built. ## Create a Deployment