mirror of https://github.com/docker/docs.git
Merge pull request #14594 from docker/master
Publish updates from master
This commit is contained in:
commit
3d54c09d16
|
@ -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
|
your workloads in parallel, on Kubernetes, Swarm, and as standalone containers. Enabling or disabling the Kubernetes server does not affect your other
|
||||||
workloads.
|
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
|
## Enable Kubernetes
|
||||||
|
|
||||||
To enable Kubernetes support and install a standalone instance of Kubernetes
|
To enable Kubernetes in Docker Desktop, go to **Preferences** > **Kubernetes** and then click **Enable 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.
|
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
{:width="750px"}
|
{: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
|
When Kubernetes is enabled and running, an additional status bar item displays
|
||||||
at the bottom right of the Docker Desktop Settings dialog.
|
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
|
variable, so you may need to type the full path of the command or add it to
|
||||||
the `PATH`.
|
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:
|
You can test the command by listing the available nodes:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
|
|
|
@ -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
|
these resources to understand some of the most common patterns for getting the
|
||||||
most benefits from Docker.
|
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
|
- 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="_"}
|
- 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="_"}
|
- [Scale your app with Kubernetes](../get-started/kube-deploy.md){: target="_blank" rel="noopener" class="_"}
|
||||||
|
|
|
@ -133,6 +133,7 @@ In this step, you create a Django starter project by building the image from the
|
||||||
$ ls -l
|
$ ls -l
|
||||||
|
|
||||||
drwxr-xr-x 2 root root composeexample
|
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 docker-compose.yml
|
||||||
-rw-rw-r-- 1 user user Dockerfile
|
-rw-rw-r-- 1 user user Dockerfile
|
||||||
-rwxr-xr-x 1 root root manage.py
|
-rwxr-xr-x 1 root root manage.py
|
||||||
|
@ -143,8 +144,10 @@ In this step, you create a Django starter project by building the image from the
|
||||||
owned by root. This happens because the container runs as the root user.
|
owned by root. This happens because the container runs as the root user.
|
||||||
Change the ownership of the new files.
|
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
|
```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
|
If you are running Docker on Mac or Windows, you should already
|
||||||
|
|
|
@ -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
|
consider that `/tmp/a` is also mounted as `/foo`. The propagation settings
|
||||||
control whether `/mnt/a` and/or `/tmp/a` would exist.
|
control whether `/mnt/a` and/or `/tmp/a` would exist.
|
||||||
|
|
||||||
|
> **Warning:**
|
||||||
|
>
|
||||||
|
> Mount propagation doesn't work with Docker Desktop.
|
||||||
|
{: .warning
|
||||||
|
|
||||||
| Propagation setting | Description |
|
| 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. |
|
| `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. |
|
||||||
|
|
Loading…
Reference in New Issue