diff --git a/desktop/kubernetes.md b/desktop/kubernetes.md index c50cf663da..2144cce49b 100644 --- a/desktop/kubernetes.md +++ b/desktop/kubernetes.md @@ -15,32 +15,16 @@ is only for local testing. Enabling Kubernetes allows you to deploy your workloads in parallel, on Kubernetes, Swarm, and as standalone containers. Enabling or disabling the Kubernetes server does not affect your other workloads. -## Prerequisites - -The Kubernetes client command `kubectl` is included and configured to connect -to the local Kubernetes server. If you have already installed `kubectl` and -pointing to some other environment, such as `minikube` or a GKE cluster, ensure you change the context so that `kubectl` is pointing to `docker-desktop`: - -```console -$ kubectl config get-contexts -$ kubectl config use-context docker-desktop -``` - -If you installed `kubectl` using Homebrew, or by some other method, and -experience conflicts, remove `/usr/local/bin/kubectl`. - ## Enable Kubernetes -To enable Kubernetes support and install a standalone instance of Kubernetes -running as a Docker container, go to **Preferences** > **Kubernetes** and then click **Enable Kubernetes**. - -By default, Kubernetes containers are hidden from commands like `docker -service ls`, because managing them manually is not supported. To see these internal containers, select **Show system containers (advanced)**. Most users do not need this option. +To enable Kubernetes in Docker Desktop, go to **Preferences** > **Kubernetes** and then click **Enable Kubernetes**. Click **Apply & Restart** to save the settings and then click **Install** to confirm. This instantiates images required to run the Kubernetes server as containers, and installs the `/usr/local/bin/kubectl` command on your machine. ![Enable Kubernetes](images/kube-enable.png){:width="750px"} +By default, Kubernetes containers are hidden from commands like `docker ps`, because managing them manually is not supported. To see these internal containers, select **Show system containers (advanced)**. Most users do not need this option. + When Kubernetes is enabled and running, an additional status bar item displays at the bottom right of the Docker Desktop Settings dialog. @@ -60,6 +44,17 @@ at `/usr/local/bin/kubectl` on Mac and at `C:\>Program Files\Docker\Docker\Resou variable, so you may need to type the full path of the command or add it to the `PATH`. +If you have already installed `kubectl` and +pointing to some other environment, such as `minikube` or a GKE cluster, ensure you change the context so that `kubectl` is pointing to `docker-desktop`: + +```console +$ kubectl config get-contexts +$ kubectl config use-context docker-desktop +``` + +If you installed `kubectl` using Homebrew, or by some other method, and +experience conflicts, remove `/usr/local/bin/kubectl`. + You can test the command by listing the available nodes: ```console diff --git a/develop/index.md b/develop/index.md index 0e271b1ebe..bdde70f6d4 100644 --- a/develop/index.md +++ b/develop/index.md @@ -16,6 +16,7 @@ If you're just getting started developing a brand new app on Docker, check out these resources to understand some of the most common patterns for getting the most benefits from Docker. +- Learn how to [build an image](../engine/reference/builder/){: target="_blank" rel="noopener" class="_"} using a Dockerfile - Use [multi-stage builds](develop-images/multistage-build.md){: target="_blank" rel="noopener" class="_"} to keep your images lean - Manage application data using [volumes](../storage/volumes.md) and [bind mounts](../storage/bind-mounts.md){: target="_blank" rel="noopener" class="_"} - [Scale your app with Kubernetes](../get-started/kube-deploy.md){: target="_blank" rel="noopener" class="_"} diff --git a/samples/django.md b/samples/django.md index 61c9a07777..e34fd8bfbc 100644 --- a/samples/django.md +++ b/samples/django.md @@ -133,6 +133,7 @@ In this step, you create a Django starter project by building the image from the $ ls -l drwxr-xr-x 2 root root composeexample + drwxr-xr-x 3 root root data -rw-rw-r-- 1 user user docker-compose.yml -rw-rw-r-- 1 user user Dockerfile -rwxr-xr-x 1 root root manage.py @@ -142,9 +143,11 @@ In this step, you create a Django starter project by building the image from the If you are running Docker on Linux, the files `django-admin` created are owned by root. This happens because the container runs as the root user. Change the ownership of the new files. + + Do not change the permission of the data folder where Postgres has its file, otherwise Postgres will not be able to start due to permission issues. ```console - $ sudo chown -R $USER:$USER . + $ sudo chown -R $USER:$USER composeexample manage.py ``` If you are running Docker on Mac or Windows, you should already diff --git a/storage/bind-mounts.md b/storage/bind-mounts.md index 013cf81e1c..d0de1010f0 100644 --- a/storage/bind-mounts.md +++ b/storage/bind-mounts.md @@ -289,6 +289,11 @@ propagation setting has a recursive counterpoint. In the case of recursion, consider that `/tmp/a` is also mounted as `/foo`. The propagation settings control whether `/mnt/a` and/or `/tmp/a` would exist. +> **Warning:** +> +> Mount propagation doesn't work with Docker Desktop. +{: .warning + | Propagation setting | Description | |:--------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `shared` | Sub-mounts of the original mount are exposed to replica mounts, and sub-mounts of replica mounts are also propagated to the original mount. |