Docker for Desktop updates (#6194)
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 178 KiB |
Before Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 133 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
|
@ -16,24 +16,15 @@ toc_max: 4
|
|||
toc_min: 1
|
||||
---
|
||||
|
||||
Welcome to Docker for Mac!
|
||||
Welcome to Docker for Mac! Docker is a full development platform for creating
|
||||
containerized apps, and Docker for Mac is the best way to get started with
|
||||
Docker _on a Mac_.
|
||||
|
||||
Docker is a full development platform for creating containerized apps, and
|
||||
Docker for Mac is the best way to get started with Docker on a Mac.
|
||||
> See [Install Docker for Mac](install.md){: target="_blank" class="_"} for information on system requirements and stable & edge channels.
|
||||
|
||||
> **Got Docker for Mac?** If you have not yet installed Docker for Mac,
|
||||
> see [Install Docker for Mac](install.md) for an explanation of stable and edge
|
||||
> channels, system requirements, and download/install information.
|
||||
## Check versions
|
||||
|
||||
>**Looking for system requirements?** Check out
|
||||
> [What to know before you install](install.md#what-to-know-before-you-install),
|
||||
> which has moved to the new install topic.
|
||||
{: id="what-to-know-before-you-install" }
|
||||
|
||||
## Check versions of Docker Engine, Compose, and Machine
|
||||
|
||||
Run these commands to test if your versions of `docker`, `docker-compose`, and
|
||||
`docker-machine` are up-to-date and compatible with `Docker.app`.
|
||||
Ensure your versions of `docker`, `docker-compose`, and `docker-machine` are up-to-date and compatible with `Docker.app`. Your output may differ if you are running different versions.
|
||||
|
||||
```shell
|
||||
$ docker --version
|
||||
|
@ -46,262 +37,205 @@ $ docker-machine --version
|
|||
docker-machine version {{ site.machine_version }}, build 9ba6da9
|
||||
```
|
||||
|
||||
> **Note**: The above is an example. Your output may differ if you are running
|
||||
> different versions.
|
||||
## Explore the application
|
||||
|
||||
## Explore the application and run examples
|
||||
1. Open a command-line terminal and test that your installation works by
|
||||
running the simple Docker image, [hello-world](https://hub.docker.com/_/hello-world/){: target="_blank" class="_"}:
|
||||
|
||||
1. Open a command-line terminal, and run some Docker commands to verify that
|
||||
Docker is working as expected.
|
||||
```shell
|
||||
$ docker run hello-world
|
||||
|
||||
Some good commands to try are `docker version` to check that you have the
|
||||
latest release installed, and `docker ps` and `docker run hello-world` to
|
||||
verify that Docker is running.
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from library/hello-world
|
||||
ca4f61b1923c: Pull complete
|
||||
Digest: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
|
||||
2. For something more adventurous, start a Dockerized web server.
|
||||
Hello from Docker!
|
||||
This message shows that your installation appears to be working correctly.
|
||||
...
|
||||
```
|
||||
|
||||
2. Start a Dockerized web server. Like the hello-world image above, if the
|
||||
image is not found locally, Docker pulls it from Docker Hub.
|
||||
|
||||
```bash
|
||||
docker run -d -p 80:80 --name webserver nginx
|
||||
$ docker run -d -p 80:80 --name webserver nginx
|
||||
```
|
||||
|
||||
If the image is not found locally, Docker pulls it from Docker Hub.
|
||||
3. In a web browser, go to `http://localhost/` to view the nginx homepage. Because we specified the default HTTP port, it isn't necessary to append `:80` at the end of the URL.
|
||||
|
||||
In a web browser, go to `http://localhost/` to bring up the home page.
|
||||
(Since you specified the default HTTP port, it isn't necessary to append
|
||||
`:80` at the end of the URL.)
|
||||
{:width="500px"}
|
||||
|
||||

|
||||
|
||||
> **Note**: Early beta releases used `docker` as the hostname to build the
|
||||
> Early beta releases used `docker` as the hostname to build the
|
||||
> URL. Now, ports are exposed on the private IP addresses of the VM and
|
||||
> forwarded to `localhost` with no other host name set. See also,
|
||||
> [Release Notes](release-notes.md) for Beta 9.
|
||||
> forwarded to `localhost` with no other host name set.
|
||||
|
||||
3. Run `docker ps` while your web server is running to see details on the
|
||||
webserver container.
|
||||
4. View the details on the container while your web server is running (with `docker container ls` or `docker ps`):
|
||||
|
||||
```none
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
56f433965490 nginx "nginx -g 'daemon off" About a minute ago Up About a minute 0.0.0.0:80->80/tcp, 443/tcp webserver
|
||||
$ docker container ls
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
56f433965490 nginx "nginx -g 'daemon off" About a minute ago Up About a minute 0.0.0.0:80->80/tcp, 443/tcp webserver
|
||||
```
|
||||
4. Stop or remove containers and images.
|
||||
|
||||
The `nginx` webserver continues to run in the container on that port
|
||||
until you stop and/or remove the container. If you want to stop the
|
||||
webserver, type: `docker container stop webserver` and start it again with `docker
|
||||
start webserver`. A stopped container does not show up with `docker ps`; for
|
||||
that, you need to run `docker ps -a`.
|
||||
5. Stop and remove containers and images with the following commands. Use the "all" flag (`--all` or `-a`) to view stopped containers.
|
||||
|
||||
To stop and remove the running container with a single command, type:
|
||||
`docker container rm -f webserver`. This removes the container, but not the
|
||||
`nginx` image. You can list local images with `docker image ls`. You might
|
||||
want to keep some images around so that you don't need to pull them again
|
||||
from Docker Hub. To remove an image you no longer need, use `docker image rm` followed by an image ID or image name. For example, `docker image rm nginx`.
|
||||
```shell
|
||||
$ docker container ls
|
||||
$ docker container stop webserver
|
||||
$ docker container ls -a
|
||||
$ docker container rm webserver
|
||||
$ docker image ls
|
||||
$ docker image rm nginx
|
||||
```
|
||||
|
||||
**Want more example applications?** [Get Started](/get-started/) and [Samples](/samples/) are great places to start.
|
||||
## Preferences menu
|
||||
|
||||
## Preferences
|
||||
Choose {: .inline} -> **Preferences** from the menu bar and configure the runtime options described below.
|
||||
|
||||
Choose {: .inline} ->
|
||||
**Preferences** from the menu bar.
|
||||
{:width="250px"}
|
||||
|
||||

|
||||
### General tab
|
||||
|
||||
You can set the following runtime options.
|
||||
{:width="400px"}
|
||||
|
||||
>**Note:** The above example shows a user signed in for integrated
|
||||
Docker Cloud access. To learn more about the feature,
|
||||
see [Docker Cloud](#docker-cloud).
|
||||
Gneral settings are:
|
||||
|
||||
### General
|
||||
- **Start Docker when you log in**: Uncheck this option if you don't want Docker to start when you open your session.
|
||||
|
||||

|
||||
- **Automatically check for updates** notifies you when an update is available.
|
||||
Click **OK** to accept and install updates (or cancel to keep the current
|
||||
version). If you disable this option, you can still find out about updates
|
||||
manually by choosing {: .inline} -> **Check for Updates**.
|
||||
|
||||
#### Auto-start, update, backups, usage data
|
||||
- **Include VM in Time Machine backups** backs up the Docker for Mac virtual machine. (Disabled by default.)
|
||||
|
||||
* Docker for Mac is set to automatically **start Docker when you log in**.
|
||||
Uncheck this option if you don't want Docker to start when you
|
||||
open your session.
|
||||
- **Securely store Docker logins in MacOS keychain** stores your Docker login credentials. (Enabled by default.)
|
||||
|
||||
* Docker for Mac is set to **automatically check for updates** and notify
|
||||
you when an update is available. If an update is found, click **OK** to accept
|
||||
and install it (or cancel to keep the current version). If you disable the check
|
||||
for updates, you can still find out about updates manually by choosing {: .inline} -> **Check for Updates**.
|
||||
- **Send usage statistics** — Send diagnostics, crash reports, and usage data to Docker. This information helps Docker improve the application and get more context for troubleshooting problems. (Enabled by default.)
|
||||
|
||||
* Check **Include VM in Time Machine backups** to back up the Docker for Mac virtual machine. (By default, this is unchecked.)
|
||||
### File sharing tab
|
||||
|
||||
* You have the option to **Securely store Docker logins in MacOS keychain**,
|
||||
enabled by default. To "opt out" of storing your Docker login credentials,
|
||||
uncheck this option.
|
||||
Choose which local directories to share with your containers. File sharing is
|
||||
required for volume mounting if the project lives outside of the `/Users`
|
||||
directory. In that case, share the drive where the Dockerfile and volume are
|
||||
located. Otherwise, you get `file not found` or `cannot start service errors at
|
||||
runtime`.
|
||||
|
||||
* **Send usage statistics** — You can set Docker for Mac to auto-send
|
||||
diagnostics, crash reports, and usage data. This information can help Docker
|
||||
improve the application and get more context for troubleshooting problems.
|
||||
Uncheck this to opt out and prevent auto-send of data. Docker may prompt for
|
||||
more information in some cases, even with auto-send enabled.
|
||||
{:width="400px"}
|
||||
|
||||
### File sharing
|
||||
File share settings are:
|
||||
|
||||
You can decide which directories on your Mac to share with containers.
|
||||
- **Add a Directory**: Click `+` and navigate to the directory you want to add.
|
||||
|
||||
* **Add a Directory** - Click `+` and navigate to the directory you
|
||||
want to add.
|
||||
|
||||

|
||||
|
||||
* Click **Apply & Restart** to make the directory available to
|
||||
containers using Docker's bind mount (`-v`) feature.
|
||||
- **Apply & Restart** makes the directory available to containers using Docker's bind mount (`-v`) feature.
|
||||
|
||||
There are some limitations on the directories that can be shared:
|
||||
|
||||
* They cannot be a subdirectory of an already shared directory.
|
||||
- They cannot be a subdirectory of an already shared directory.
|
||||
- They cannot already exist inside of Docker.
|
||||
|
||||
* They cannot already exist inside of Docker.
|
||||
For more information, see:
|
||||
|
||||
See [Namespaces](osxfs.md#namespaces) in the topic on
|
||||
[osxfs file system sharing](osxfs.md) for more information.
|
||||
- [Namespaces](osxfs.md#namespaces){: target="_blank" class="_"} in the topic on [osxfs file system sharing](osxfs.md).
|
||||
- [Volume mounting requires file sharing for any project directories outside of `/Users`](troubleshoot.md#volume-mounting-requires-file-sharing-for-any-project-directories-outside-of-users).)
|
||||
|
||||
> **Tip**: File sharing is required for volume mounting if the project lives
|
||||
> outside of the `/Users` directory. In that case, share the drive where the
|
||||
> Dockerfile and volume are located. Otherwise, you get `file not found` or
|
||||
> `cannot start service errors at runtime`. (See also
|
||||
> [Volume mounting requires file sharing for any project directories outside of `/Users`](troubleshoot.md#volume-mounting-requires-file-sharing-for-any-project-directories-outside-of-users).)
|
||||
### Advanced tab
|
||||
|
||||
On the Advanced tab, you can limit resources available to Docker.
|
||||
|
||||
### Advanced
|
||||
{:width="400px"}
|
||||
|
||||

|
||||
Advanced settings are:
|
||||
|
||||
**CPUs**: By default, Docker for Mac is set to use half the number of processors available
|
||||
on the host machine. To increase processing power, set this to a higher number;
|
||||
to decrease, lower the number.
|
||||
|
||||
#### CPUs
|
||||
**Memory**: By default, Docker for Mac is set to use `2` GB runtime memory, allocated from
|
||||
the total available memory on your Mac. To increase RAM, set this to a higher number;
|
||||
to decrease it, lower the number.
|
||||
|
||||
By default, Docker for Mac is set to use half the number of processors available on the host machine. You can increase
|
||||
processing power for the app by setting this to a higher number, or lower it to
|
||||
have Docker for Mac use fewer computing resources.
|
||||
**Swap**: Configure swappiness as needed. The default is 1.
|
||||
|
||||
#### Memory
|
||||
### Disk tab
|
||||
|
||||
By default, Docker for Mac is set to use `2` GB runtime memory, allocated from
|
||||
the total available memory on your Mac. You can increase the RAM on the app to
|
||||
get faster performance by setting this number higher (for example to `3`) or
|
||||
lower (to `1`) if you want Docker for Mac to use less memory.
|
||||
Specify the **Disk image location** of the Linux volume, where containers and images are stored.
|
||||
|
||||
#### Disk image location (storage)
|
||||
You can also move the disk image location. If you attempt to move the disk image
|
||||
to a location that already has one, you get a prompt asking if you want to use
|
||||
the existing image or replace it.
|
||||
|
||||
You can specify the **Disk image location** of the Linux volume, which is where
|
||||
containers and images are stored.
|
||||
{:width="400px"}
|
||||
|
||||
You can move the disk image location.
|
||||
|
||||
If you attempt to move the disk image to a location that
|
||||
already has one, you get a prompt asking if you want to use the existing
|
||||
image or replace it.
|
||||
|
||||

|
||||
|
||||
### HTTP proxy settings
|
||||
### Proxies tab
|
||||
|
||||
Docker for Mac detects HTTP/HTTPS Proxy Settings and automatically propagate
|
||||
these to Docker and to your containers. For example, if you set your proxy
|
||||
settings to `http://proxy.example.com`, Docker uses this proxy when pulling
|
||||
containers.
|
||||
|
||||

|
||||
{:width="400px"}
|
||||
|
||||
<p id="daemon-experimental-mode" />
|
||||
|
||||
### Docker Daemon
|
||||
### Daemon tab
|
||||
|
||||
You can configure options on the Docker daemon that determine how your
|
||||
containers run. You can configure some **Basic** options on the daemon with
|
||||
interactive settings, or switch to **Advanced** to edit the JSON directly.
|
||||
You can configure options on the Docker daemon that determine how your containers run.
|
||||
|
||||
The settings offered on **Basic** dialog can be
|
||||
configured directly in the JSON as well. This version just surfaces
|
||||
some of the common settings to make it easier to configure them.
|
||||
Select **Basic** to configure the daemon with interactive settings, or select
|
||||
**Advanced** to edit the JSON directly.
|
||||
|
||||
* [Experimental mode](#experimental-mode)
|
||||
* [Custom registries](#custom-registries)
|
||||
* [Edit the daemon configuration file](#edit-the-daemon-configuration-file)
|
||||
{:width="400px"}
|
||||
|
||||

|
||||
|
||||
#### Experimental mode
|
||||
#### Experimental features
|
||||
|
||||
Both Docker for Mac Stable and Edge releases have experimental features enabled
|
||||
on Docker Engine, as described in the [Docker Experimental Features
|
||||
README](https://github.com/moby/moby/blob/master/experimental/README.md) on
|
||||
GitHub.
|
||||
|
||||
Experimental features are not appropriate for production environments or
|
||||
workloads. They are meant to be sandbox experiments for new ideas. Some
|
||||
experimental features may become incorporated into upcoming stable releases, but
|
||||
others may be modified or pulled from subsequent Edge releases, and never
|
||||
released on Stable.
|
||||
|
||||
On both Edge and Stable releases, you can toggle **experimental mode** on and
|
||||
off. If you toggle it off, Docker for Mac uses the current generally available
|
||||
on Docker Engine, as described [Docker Experimental Features README](https://github.com/docker/docker-ce/blob/master/components/cli/experimental/README.md){: target="_blank" class="_"}. If you uncheck **experimental mode**, Docker for Mac uses the current generally available
|
||||
release of Docker Engine.
|
||||
|
||||
You can check whether you are running experimental mode or not by typing `docker
|
||||
version` on the command line. Experimental mode is listed under `Server` data.
|
||||
If `Experimental` is `true`, then Docker is running in experimental mode, as
|
||||
shown here. (If `false`, Experimental mode is off.)
|
||||
> Don't enable experimental features in production
|
||||
>
|
||||
> Experimental features are not appropriate for production environments or workloads. They are meant to be sandbox experiments for new ideas. Some experimental features may become incorporated into upcoming stable releases, but others may be modified or pulled from subsequent Edge releases, and never released on Stable.
|
||||
|
||||
You can see whether you are running experimental mode at the command line. If
|
||||
`Experimental` is `true`, then Docker is running in experimental mode, as shown
|
||||
here. (If `false`, Experimental mode is off.)
|
||||
|
||||
```bash
|
||||
$ docker version
|
||||
Client:
|
||||
Version: 1.13.0-rc3
|
||||
API version: 1.25
|
||||
Go version: go1.7.3
|
||||
Git commit: 4d92237
|
||||
Built: Tue Dec 6 01:15:44 2016
|
||||
OS/Arch: darwin/amd64
|
||||
|
||||
Server:
|
||||
Version: 1.13.0-rc3
|
||||
API version: 1.25 (minimum version 1.12)
|
||||
Go version: go1.7.3
|
||||
Git commit: 4d92237
|
||||
Built: Tue Dec 6 01:15:44 2016
|
||||
OS/Arch: linux/amd64
|
||||
Experimental: true
|
||||
{% raw %}$ docker version -f {{.Server.Experimental}}{% endraw %}
|
||||
true
|
||||
```
|
||||
|
||||
#### Custom registries
|
||||
#### Insecure registries
|
||||
|
||||
As an alternative to using [Docker Hub](https://hub.docker.com/) to store your
|
||||
public or private images or [Docker Trusted
|
||||
Registry](/datacenter/dtr/2.1/guides/index.md), you can use Docker to set up
|
||||
your own insecure [registry](/registry/introduction.md). Add URLs for insecure
|
||||
registries and registry mirrors on which to host your images.
|
||||
You can set up a custom and insecure [registry](/registry/introduction.md){: target="_blank" class="_"}
|
||||
to store your public or private images (instead of using [Docker Hub](https://hub.docker.com/){:target="_blank" class="_"}
|
||||
or [Docker Trusted Registry](/datacenter/dtr/2.1/guides/index.md)).
|
||||
Add URLs for your insecure registries and registry mirrors on which to host your images.
|
||||
|
||||
See also, [How do I add custom CA
|
||||
certificates?](/docker-for-mac/faqs.md#how-do-i-add-custom-ca-certificates) and
|
||||
[How do I add client
|
||||
certificates](/docker-for-mac/faqs.md#how-do-i-client-certificates) in the FAQs.
|
||||
See also:
|
||||
- [How do I add custom CA certificates?](/docker-for-mac/faqs.md#how-do-i-add-custom-ca-certificates){:target="_blank" class="_"}
|
||||
- [How do I add client certificates](/docker-for-mac/faqs.md#how-do-i-client-certificates){:target="_blank" class="_"}
|
||||
|
||||
#### Edit the daemon configuration file
|
||||
#### Daemon configuration file
|
||||
|
||||
On the **Daemon -> Advanced dialog**, you can directly configure the daemon from
|
||||
the JSON file, and determine entirely how your containers run. For a full
|
||||
list of options on the Docker daemon, see
|
||||
[daemon](/engine/reference/commandline/dockerd.md) in the Docker Engine
|
||||
command line reference.
|
||||
Click the **Advanced** tab to configure the daemon from the JSON file. For a full
|
||||
list of options, see the Docker Engine [dockerd commandline reference](/engine/reference/commandline/dockerd.md){:target="_blank" class="_"}.
|
||||
|
||||
After editing the daemon configuration , click **Apply & Restart** to save it
|
||||
and reboot Docker. Or, to cancel changes, click another preference tab, then
|
||||
choose to discard or not apply changes when asked.
|
||||
Click **Apply & Restart** to save your settings and reboot Docker. Or, to cancel
|
||||
changes, click another preference tab, then choose to discard or not apply changes when asked.
|
||||
|
||||

|
||||
{:width="400px"}
|
||||
|
||||
### Kubernetes
|
||||
### Kubernetes tab
|
||||
|
||||
**Kubernetes is only available in Docker for Mac 17.12 CE and higher, on the Edge
|
||||
channel.** Kubernetes support is not included in Docker for Mac Stable releases.
|
||||
To find out more about Stable and Edge channels and how to switch between them,
|
||||
see [General configuration](/docker-for-mac/#general).
|
||||
**Kubernetes is only available in Docker for Mac 17.12 CE and higher, on the Edge channel.**
|
||||
Kubernetes support is not included in Docker for Mac Stable releases. To find
|
||||
out more about Stable and Edge channels and how to switch between them, see
|
||||
[General configuration](/docker-for-mac/#general){:target="_blank" class="_"}.
|
||||
|
||||
Docker for Mac 17.12 CE (and higher) Edge includes a standalone Kubernetes server
|
||||
that runs on your Mac, so that you can test deploying your Docker workloads on
|
||||
|
@ -313,8 +247,8 @@ pointing to some other environment, such as `minikube` or a GKE cluster, be sure
|
|||
to change context so that `kubectl` is pointing to `docker-for-desktop`:
|
||||
|
||||
```bash
|
||||
kubectl config get-contexts
|
||||
kubectl config use-context docker-for-desktop
|
||||
$ kubectl config get-contexts
|
||||
$ kubectl config use-context docker-for-desktop
|
||||
```
|
||||
|
||||
If you installed `kubectl` with Homebrew, or by some other method, and
|
||||
|
@ -322,20 +256,23 @@ experience conflicts, remove `/usr/local/bin/kubectl`.
|
|||
|
||||
- To enable Kubernetes support and install a standalone instance of Kubernetes
|
||||
running as a Docker container, select **Enable Kubernetes** and click the
|
||||
**Apply and restart** button.
|
||||
**Apply** button.
|
||||
|
||||

|
||||
{: .with-border width="400px"}
|
||||
|
||||
An internet connection is required. Images required to run the Kubernetes
|
||||
|
||||
An Internet connection is required. Images required to run the Kubernetes
|
||||
server are downloaded and instantiated as containers, and the
|
||||
`/usr/local/bin/kubectl` command is installed on your Mac.
|
||||
|
||||

|
||||
|
||||
When Kubernetes is enabled and running, an additional status bar item displays
|
||||
at the bottom right of the Docker for Mac Preferences dialog.
|
||||
|
||||

|
||||
{:width="400px"}
|
||||
|
||||
The status of Kubernetes shows in the Docker menu and the context points to `docker-for-desktop`.
|
||||
|
||||
{: .with-border width="400px"}
|
||||
|
||||
- By default, Kubernetes containers are hidden from commands like `docker
|
||||
service ls`, because managing them manually is not supported. To make them
|
||||
|
@ -347,38 +284,41 @@ experience conflicts, remove `/usr/local/bin/kubectl`.
|
|||
`/usr/local/bin/kubectl` command is removed.
|
||||
|
||||
For more about using the Kubernetes integration with
|
||||
Docker for Mac, see [Deploy to Kubernetes](/docker-for-mac/kubernetes.md).
|
||||
Docker for Mac, see [Deploy to Kubernetes](/docker-for-mac/kubernetes.md){:target="_blank" class="_"}.
|
||||
|
||||
## Uninstall or reset
|
||||
Choose {: .inline} ->
|
||||
**Preferences** from the menu bar, then click **Uninstall / Reset** on the
|
||||
Preferences dialog.
|
||||
### Reset tab
|
||||
|
||||

|
||||
Select {: .inline} ->
|
||||
**Preferences** from the menu bar, then click **Reset** to reset factory
|
||||
defaults, restart the Docker daemon, or uninstall.
|
||||
|
||||
{:width="400px"}
|
||||
|
||||
Reset settings are:
|
||||
|
||||
* **Restart** - Select to restart the Docker daemon.
|
||||
|
||||
* **Remove all data** - This option removes/resets all Docker data _without_
|
||||
a reset to factory defaults (which would cause you to lose settings).
|
||||
|
||||
* **Uninstall** - Choose this option to remove Docker for Mac from your system.
|
||||
|
||||
* **Reset to factory defaults** - Choose this option to reset all options on
|
||||
Docker for Mac to its initial state, the same as when it was first installed.
|
||||
|
||||
* **Uninstall** - Choose this option to remove Docker for Mac from your system.
|
||||
|
||||
### Uninstall from the command line
|
||||
|
||||
Alternatively, you can uninstall Docker for Mac from the command line with this
|
||||
command: `<DockerforMacPath> --uninstall`. If Docker is installed in the default
|
||||
location, the following command provides a clean uninstall.
|
||||
|
||||
```shell
|
||||
$ /Applications/Docker.app/Contents/MacOS/Docker --uninstall
|
||||
Docker is running, exiting...
|
||||
Docker uninstalled successfully. You can move the Docker application to the trash.
|
||||
```
|
||||
|
||||
You might want to use the command-line uninstall if, for example, you find that
|
||||
the app is non-functional, and you cannot uninstall it from the menu.
|
||||
> Uninstall Docker for Mac from the commandline
|
||||
>
|
||||
> To uninstall Docker from Mac from a terminal, run: `<DockerforMacPath> --uninstall`.
|
||||
> If your instance is installed in the default location, this command provides a
|
||||
> clean uninstall:
|
||||
>
|
||||
> ```shell
|
||||
> $ /Applications/Docker.app/Contents/MacOS/Docker --uninstall
|
||||
> Docker is running, exiting...
|
||||
> Docker uninstalled successfully. You can move the Docker application to the trash.
|
||||
> ```
|
||||
> You might want to use the command-line uninstall if, for example, you find that
|
||||
> the app is non-functional, and you cannot uninstall it from the menu.
|
||||
|
||||
## Add TLS certificates
|
||||
|
||||
|
@ -399,26 +339,24 @@ the certificate to the macOS keychain, which is picked up by Docker for
|
|||
Mac. Here is an example.
|
||||
|
||||
```bash
|
||||
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.crt
|
||||
$ sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.crt
|
||||
```
|
||||
|
||||
Or, if you prefer to add the certificate to your own local keychain only (rather
|
||||
than for all users), run this command instead:
|
||||
|
||||
```
|
||||
security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain ca.crt
|
||||
$ security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain ca.crt
|
||||
```
|
||||
|
||||
See also, [Directory structures for
|
||||
certificates](#directory-structures-for-certificates).
|
||||
See also, [Directory structures for certificates](#directory-structures-for-certificates).
|
||||
|
||||
> **Note:** You need to restart Docker for Mac after making any changes to
|
||||
the keychain or to the `~/.docker/certs.d` directory in order for
|
||||
the changes to take effect.
|
||||
|
||||
For a complete explanation of how to do this, see the blog post [Adding
|
||||
Self-signed Registry Certs to Docker & Docker for
|
||||
Mac](http://container-solutions.com/adding-self-signed-registry-certs-docker-mac/).
|
||||
For a complete explanation of how to do this, see the blog post
|
||||
[Adding Self-signed Registry Certs to Docker & Docker for Mac](http://container-solutions.com/adding-self-signed-registry-certs-docker-mac/){:target="_blank" class="_"}.
|
||||
|
||||
### Add client certificates
|
||||
|
||||
|
@ -430,16 +368,16 @@ When the Docker for Mac application starts up, it copies the `~/.docker/certs.d`
|
|||
folder on your Mac to the `/etc/docker/certs.d` directory on Moby (the Docker
|
||||
for Mac `xhyve` virtual machine).
|
||||
|
||||
> * You need to restart Docker for Mac after making any changes to
|
||||
the keychain or to the `~/.docker/certs.d` directory in order for
|
||||
the changes to take effect.
|
||||
> * You need to restart Docker for Mac after making any changes to the keychain
|
||||
> or to the `~/.docker/certs.d` directory in order for the changes to take
|
||||
> effect.
|
||||
>
|
||||
> * The registry cannot be listed as an _insecure registry_ (see [Docker
|
||||
Daemon](/docker-for-mac/index.md#docker-daemon)). Docker for Mac ignores
|
||||
certificates listed under insecure registries, and does not send client
|
||||
certificates. Commands like `docker run` that attempt to pull from
|
||||
the registry produce error messages on the command line, as well as on the
|
||||
registry.
|
||||
> Daemon](/docker-for-mac/index.md#docker-daemon)). Docker for Mac ignores
|
||||
> certificates listed under insecure registries, and does not send client
|
||||
> certificates. Commands like `docker run` that attempt to pull from the
|
||||
> registry produce error messages on the command line, as well as on the
|
||||
> registry.
|
||||
|
||||
### Directory structures for certificates
|
||||
|
||||
|
@ -490,43 +428,42 @@ installed both in Bash and Zsh.
|
|||
|
||||
### Bash
|
||||
|
||||
Bash has [built-in support for completion](https://www.debian-administration.org/article/316/An_introduction_to_bash_completion_part_1)
|
||||
Bash has [built-in support for completion](https://www.debian-administration.org/article/316/An_introduction_to_bash_completion_part_1){:target="_blank" class="_"}
|
||||
To activate completion for Docker commands, these files need to be copied or
|
||||
symlinked to your `bash_completion.d/` directory. For example, if you installed
|
||||
bash via [Homebrew](http://brew.sh/):
|
||||
|
||||
```bash
|
||||
ln -s /Applications/Docker.app/Contents/Resources/etc/docker.bash-completion $(brew --prefix)/etc/bash_completion.d/docker
|
||||
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-machine.bash-completion $(brew --prefix)/etc/bash_completion.d/docker-machine
|
||||
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-compose.bash-completion $(brew --prefix)/etc/bash_completion.d/docker-compose
|
||||
etc=/Applications/Docker.app/Contents/Resources/etc
|
||||
ln -s $etc/docker.bash-completion $(brew --prefix)/etc/bash_completion.d/docker
|
||||
ln -s $etc/docker-machine.bash-completion $(brew --prefix)/etc/bash_completion.d/docker-machine
|
||||
ln -s $etc/docker-compose.bash-completion $(brew --prefix)/etc/bash_completion.d/docker-compose
|
||||
```
|
||||
|
||||
### Zsh
|
||||
|
||||
In Zsh, the [completion system](http://zsh.sourceforge.net/Doc/Release/Completion-System.html)
|
||||
In Zsh, the [completion system](http://zsh.sourceforge.net/Doc/Release/Completion-System.html){:target="_blank" class="_"}
|
||||
takes care of things. To activate completion for Docker commands, these files
|
||||
need to be copied or symlinked to your Zsh `site-functions/` directory. For
|
||||
example, if you installed Zsh via [Homebrew](http://brew.sh/):
|
||||
|
||||
```bash
|
||||
ln -s /Applications/Docker.app/Contents/Resources/etc/docker.zsh-completion /usr/local/share/zsh/site-functions/_docker
|
||||
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-machine.zsh-completion /usr/local/share/zsh/site-functions/_docker-machine
|
||||
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-compose.zsh-completion /usr/local/share/zsh/site-functions/_docker-compose
|
||||
etc=/Applications/Docker.app/Contents/Resources/etc
|
||||
ln -s $etc/docker.zsh-completion /usr/local/share/zsh/site-functions/_docker
|
||||
ln -s $etc/docker-machine.zsh-completion /usr/local/share/zsh/site-functions/_docker-machine
|
||||
ln -s $etc/docker-compose.zsh-completion /usr/local/share/zsh/site-functions/_docker-compose
|
||||
```
|
||||
|
||||
## Give feedback and get help
|
||||
|
||||
To get help from the community, review current user topics, join or start a
|
||||
discussion, log on to our [Docker for Mac
|
||||
forum](https://forums.docker.com/c/docker-for-mac).
|
||||
discussion, log on to our [Docker for Mac forum](https://forums.docker.com/c/docker-for-mac){:target="_blank" class="_"}.
|
||||
|
||||
To report bugs or problems, log on to [Docker for Mac issues on
|
||||
GitHub](https://github.com/docker/for-mac/issues), where you can review
|
||||
To report bugs or problems, log on to [Docker for Mac issues on GitHub](https://github.com/docker/for-mac/issues){:target="_blank" class="_"}, where you can review
|
||||
community reported issues, and file new ones. See [Diagnose problems, send
|
||||
feedback, and create GitHub
|
||||
issues](troubleshoot.md#diagnose-problems-send-feedback-and-create-github-issues). As a part of reporting issues on GitHub, we can help you troubleshoot
|
||||
the log
|
||||
data.
|
||||
issues](troubleshoot.md#diagnose-problems-send-feedback-and-create-github-issues). As
|
||||
a part of reporting issues on GitHub, we can help you troubleshoot the log data.
|
||||
|
||||
To give us feedback on the documentation or update it yourself, use the Feedback
|
||||
options at the bottom of each docs page.
|
||||
|
@ -534,45 +471,39 @@ options at the bottom of each docs page.
|
|||
## Docker Store
|
||||
|
||||
Choose **Docker Store** from the Docker for Mac menu to get to the Docker app
|
||||
downloads site. [Docker store](https://store.docker.com/) is a component of the
|
||||
downloads site. [Docker store](https://store.docker.com/){:target="_blank" class="_"} is a component of the
|
||||
next-generation Docker Hub, and the best place to find compliant, trusted
|
||||
commercial and free software distributed as Docker Images.
|
||||
|
||||

|
||||
{:width="550px"}
|
||||
|
||||
## Docker Cloud
|
||||
|
||||
You can access your [Docker Cloud](/docker-cloud/index.md) account from within
|
||||
Docker for Mac.
|
||||
You can access your [Docker Cloud](/docker-cloud/index.md){:target="_blank" class="_"} account from within Docker for Mac.
|
||||
|
||||

|
||||
{:width="550px"}
|
||||
|
||||
From the Docker for Mac menu, sign in to Docker Cloud with your Docker ID, or
|
||||
create one.
|
||||
From the Docker for Mac menu, sign in to Docker Cloud with your Docker ID, or create one.
|
||||
|
||||

|
||||
{: .with-border width="250px"}
|
||||
|
||||
Then use the Docker for Mac menu to create, view, or navigate directly to your
|
||||
Cloud resources, including **organizations**, **repositories**, and **swarms**.
|
||||
|
||||
Check out these [Docker Cloud topics](/docker-cloud/index.md) to learn more:
|
||||
Check out these [Docker Cloud topics](/docker-cloud/index.md){:target="_blank" class="_"} to learn more:
|
||||
|
||||
* [Organizations and Teams in Docker Cloud](/docker-cloud/orgs/index.md)
|
||||
* [Builds and Images](/docker-cloud/builds/index.md)
|
||||
* [Swarms in Docker Cloud](/docker-cloud/cloud-swarm/index.md)
|
||||
* [Organizations and Teams in Docker Cloud](/docker-cloud/orgs/index.md){:target="_blank" class="_"}
|
||||
* [Builds and Images](/docker-cloud/builds/index.md){:target="_blank" class="_"}
|
||||
* [Swarms in Docker Cloud](/docker-cloud/cloud-swarm/index.md){:target="_blank" class="_"}
|
||||
|
||||
Need a direct link to Cloud? [Take me to Docker
|
||||
Cloud](https://cloud.docker.com/){: target="_blank" class="_" }.
|
||||
Need a direct link to Cloud? [Take me to Docker Cloud](https://cloud.docker.com/){: target="_blank" class="_" }.
|
||||
|
||||
## Where to go next
|
||||
|
||||
* Try out the walkthrough at [Get Started](/get-started/).
|
||||
* Try out the walkthrough at [Get Started](/get-started/){: target="_blank" class="_"}.
|
||||
|
||||
* Dig in deeper with [Docker Labs](https://github.com/docker/labs/) example
|
||||
walkthroughs and source code.
|
||||
* Dig in deeper with [Docker Labs](https://github.com/docker/labs/) example walkthroughs and source code.
|
||||
|
||||
* For a summary of Docker command line interface (CLI) commands, see
|
||||
[Docker CLI Reference Guide](/engine/api.md).
|
||||
* For a summary of Docker command line interface (CLI) commands, see [Docker CLI Reference Guide](/engine/api.md){: target="_blank" class="_"}.
|
||||
|
||||
* Check out the blog post
|
||||
[Introducing Docker 1.13.0](https://blog.docker.com/2017/01/whats-new-in-docker-1-13/).
|
||||
* Check out the blog post, [What’s New in Docker 17.06 Community Edition (CE)](https://blog.docker.com/2017/07/whats-new-docker-17-06-community-edition-ce/){: target="_blank" class="_"}.
|
||||
|
|
|
@ -157,7 +157,7 @@ for Docker for Mac, and how the two products can coexist.
|
|||
|
||||
3. Click the whale ({: .inline}) to get Preferences and other options.
|
||||
|
||||

|
||||

|
||||
|
||||
4. Select **About Docker** to verify that you have the latest version.
|
||||
|
||||
|
|
|
@ -12,7 +12,9 @@ browse and log issues on GitHub, and find workarounds for known problems.
|
|||
|
||||
## Docker Knowledge Hub
|
||||
|
||||
**Looking for help with Docker for Mac?** Check out the [Docker Knowledge Hub](http://success.docker.com/) for knowledge base articles, FAQs, and technical support for various subscription levels.
|
||||
**Looking for help with Docker for Mac?** Check out the [Docker Knowledge
|
||||
Hub](http://success.docker.com/) for knowledge base articles, FAQs, and
|
||||
technical support for various subscription levels.
|
||||
|
||||
## Diagnose problems, send feedback, and create GitHub issues
|
||||
|
||||
|
@ -49,7 +51,8 @@ GitHub](https://github.com/docker/for-mac/issues/) in your web browser in a
|
|||
|
||||
* System and version details
|
||||
|
||||
* Sections where you can fill in a description of expected and actual behavior, and steps to reproduce the issue
|
||||
* Sections where you can fill in a description of expected and actual behavior,
|
||||
and steps to reproduce the issue
|
||||
|
||||

|
||||
|
||||
|
@ -125,13 +128,13 @@ does not send client certificates to them. Commands like `docker run` that
|
|||
attempt to pull from the registry produces error messages on the command
|
||||
line, like this:
|
||||
|
||||
```bash
|
||||
```
|
||||
Error response from daemon: Get http://192.168.203.139:5858/v2/: malformed HTTP response "\x15\x03\x01\x00\x02\x02"
|
||||
```
|
||||
|
||||
As well as on the registry. For example:
|
||||
|
||||
```config
|
||||
```
|
||||
2017/06/20 18:15:30 http: TLS handshake error from 192.168.203.139:52882: tls: client didn't provide a certificate
|
||||
2017/06/20 18:15:30 http: TLS handshake error from 192.168.203.139:52883: tls: first record does not look like a TLS handshake
|
||||
```
|
||||
|
@ -146,7 +149,11 @@ If, after installing Docker for Mac, you [change the name of your macOS user
|
|||
account and home folder](https://support.apple.com/en-us/HT201548), Docker for
|
||||
Mac fails to start. To solve this problem, uninstall and reinstall Docker for Mac under the new user account.
|
||||
|
||||
See also, the discussion on the issue [docker/for-mac#1209](https://github.com/docker/for-mac/issues/1209) and [Do I need to reinstall Docker for Mac if I change the name of my macOS account?](faqs.md#do-i-need-to-reinstall-docker-for-mac-if-i-change-the-name-of-my-macos-account) in the FAQs.
|
||||
See also, the discussion on the issue
|
||||
[docker/for-mac#1209](https://github.com/docker/for-mac/issues/1209) and [Do I
|
||||
need to reinstall Docker for Mac if I change the name of my macOS
|
||||
account?](faqs.md#do-i-need-to-reinstall-docker-for-mac-if-i-change-the-name-of-my-macos-account)
|
||||
in the FAQs.
|
||||
|
||||
### Volume mounting requires file sharing for any project directories outside of `/Users`
|
||||
|
||||
|
@ -163,12 +170,15 @@ contains the Dockerfile and volume.
|
|||
### Recreate or update your containers after Beta 18 upgrade
|
||||
|
||||
Docker 1.12.0 RC3 release introduces a backward incompatible change from RC2 to
|
||||
RC3. (For more information, see (For more information, see [moby/moby#24343 (comment)](https://github.com/moby/moby/issues/24343#issuecomment-230623542).)
|
||||
RC3. (For more information, see (For more information, see [moby/moby#24343
|
||||
(comment)](https://github.com/moby/moby/issues/24343#issuecomment-230623542).)
|
||||
|
||||
You may get the following error when you try to start a container created with
|
||||
pre-Beta 18 Docker for Mac applications.
|
||||
|
||||
Error response from daemon: Unknown runtime specified default
|
||||
```
|
||||
Error response from daemon: Unknown runtime specified default
|
||||
```
|
||||
|
||||
You can fix this by either
|
||||
[recreating](troubleshoot.md#recreate-your-containers) or
|
||||
|
@ -180,7 +190,9 @@ If you get the error message shown above, we recommend recreating them.
|
|||
|
||||
To recreate your containers, use Docker Compose.
|
||||
|
||||
docker-compose down && docker-compose up
|
||||
```
|
||||
docker-compose down && docker-compose up
|
||||
```
|
||||
|
||||
#### Update your containers
|
||||
|
||||
|
@ -188,24 +200,26 @@ To fix existing containers, follow these steps.
|
|||
|
||||
1. Run this command.
|
||||
|
||||
$ docker run --rm -v /var/lib/docker:/docker cpuguy83/docker112rc3-runtimefix:rc3
|
||||
```
|
||||
$ docker run --rm -v /var/lib/docker:/docker cpuguy83/docker112rc3-runtimefix:rc3
|
||||
|
||||
Unable to find image 'cpuguy83/docker112rc3-runtimefix:rc3' locally
|
||||
rc3: Pulling from cpuguy83/docker112rc3-runtimefix
|
||||
91e7f9981d55: Pull complete
|
||||
Digest: sha256:96abed3f7a7a574774400ff20c6808aac37d37d787d1164d332675392675005c
|
||||
Status: Downloaded newer image for cpuguy83/docker112rc3-runtimefix:rc3
|
||||
proccessed 1648f773f92e8a4aad508a45088ca9137c3103457b48be1afb3fd8b4369e5140
|
||||
skipping container '433ba7ead89ba645efe9b5fff578e674aabba95d6dcb3910c9ad7f1a5c6b4538': already fixed
|
||||
proccessed 43df7f2ac8fc912046dfc48cf5d599018af8f60fee50eb7b09c1e10147758f06
|
||||
proccessed 65204cfa00b1b6679536c6ac72cdde1dbb43049af208973030b6d91356166958
|
||||
proccessed 66a72622e306450fd07f2b3a833355379884b7a6165b7527c10390c36536d82d
|
||||
proccessed 9d196e78390eeb44d3b354d24e25225d045f33f1666243466b3ed42fe670245c
|
||||
proccessed b9a0ecfe2ed9d561463251aa90fd1442299bcd9ea191a17055b01c6a00533b05
|
||||
proccessed c129a775c3fa3b6337e13b50aea84e4977c1774994be1f50ff13cbe60de9ac76
|
||||
proccessed dea73dc21126434f14c58b83140bf6470aa67e622daa85603a13bc48af7f8b04
|
||||
proccessed dfa8f9278642ab0f3e82ee8e4ad029587aafef9571ff50190e83757c03b4216c
|
||||
proccessed ee5bf706b6600a46e5d26327b13c3c1c5f7b261313438d47318702ff6ed8b30b
|
||||
Unable to find image 'cpuguy83/docker112rc3-runtimefix:rc3' locally
|
||||
rc3: Pulling from cpuguy83/docker112rc3-runtimefix
|
||||
91e7f9981d55: Pull complete
|
||||
Digest: sha256:96abed3f7a7a574774400ff20c6808aac37d37d787d1164d332675392675005c
|
||||
Status: Downloaded newer image for cpuguy83/docker112rc3-runtimefix:rc3
|
||||
proccessed 1648f773f92e8a4aad508a45088ca9137c3103457b48be1afb3fd8b4369e5140
|
||||
skipping container '433ba7ead89ba645efe9b5fff578e674aabba95d6dcb3910c9ad7f1a5c6b4538': already fixed
|
||||
proccessed 43df7f2ac8fc912046dfc48cf5d599018af8f60fee50eb7b09c1e10147758f06
|
||||
proccessed 65204cfa00b1b6679536c6ac72cdde1dbb43049af208973030b6d91356166958
|
||||
proccessed 66a72622e306450fd07f2b3a833355379884b7a6165b7527c10390c36536d82d
|
||||
proccessed 9d196e78390eeb44d3b354d24e25225d045f33f1666243466b3ed42fe670245c
|
||||
proccessed b9a0ecfe2ed9d561463251aa90fd1442299bcd9ea191a17055b01c6a00533b05
|
||||
proccessed c129a775c3fa3b6337e13b50aea84e4977c1774994be1f50ff13cbe60de9ac76
|
||||
proccessed dea73dc21126434f14c58b83140bf6470aa67e622daa85603a13bc48af7f8b04
|
||||
proccessed dfa8f9278642ab0f3e82ee8e4ad029587aafef9571ff50190e83757c03b4216c
|
||||
proccessed ee5bf706b6600a46e5d26327b13c3c1c5f7b261313438d47318702ff6ed8b30b
|
||||
```
|
||||
|
||||
2. Quit Docker.
|
||||
|
||||
|
@ -215,8 +229,10 @@ To fix existing containers, follow these steps.
|
|||
|
||||
4. Try to start the container again:
|
||||
|
||||
$ docker start old-container
|
||||
old-container
|
||||
```
|
||||
$ docker start old-container
|
||||
old-container
|
||||
```
|
||||
|
||||
### Incompatible CPU detected
|
||||
|
||||
|
@ -249,41 +265,56 @@ know before you install](install.md#what-to-know-before-you-install).
|
|||
|
||||
### Workarounds for common problems
|
||||
|
||||
* IPv6 workaround to auto-filter DNS addresses - IPv6 is not yet supported on Docker for Mac. If you try to use it, network timeouts occur when running `docker` commands that need access to external network servers, such as `docker pull` or `docker push`.
|
||||
* IPv6 workaround to auto-filter DNS addresses - IPv6 is not yet supported on
|
||||
Docker for Mac. If you try to use it, network timeouts occur when running
|
||||
`docker` commands that need access to external network servers, such as
|
||||
`docker pull` or `docker push`.
|
||||
|
||||
$ docker pull busybox
|
||||
Using default tag: latest
|
||||
Pulling repository docker.io/library/busybox
|
||||
Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/busybox/images. You may want to check your internet connection or if you are behind a proxy.
|
||||
```
|
||||
$ docker pull busybox
|
||||
Using default tag: latest
|
||||
Pulling repository docker.io/library/busybox
|
||||
Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/busybox/images. You may want to check your internet connection or if you are behind a proxy.
|
||||
```
|
||||
|
||||
Starting with v1.12.1, 2016-09016 on the stable channel, and Beta 24 on the beta channel, a workaround is provided that auto-filters out the IPv6 addresses in DNS server lists and enables successful network accesss. For example, `2001:4860:4860::8888` would become `8.8.8.8`. So, the only workaround action needed for users is to [upgrade to Docker for Mac stable v1.12.1 or newer, or Beta 24 or newer](/docker-for-mac/install.md#download-docker-for-mac).
|
||||
Starting with v1.12.1, 2016-09016 on the stable channel, and Beta 24 on the
|
||||
beta channel, a workaround is provided that auto-filters out the IPv6
|
||||
addresses in DNS server lists and enables successful network accesss. For
|
||||
example, `2001:4860:4860::8888` would become `8.8.8.8`. So, the only
|
||||
workaround action needed for users is to [upgrade to Docker for Mac stable
|
||||
v1.12.1 or newer, or Beta 24 or
|
||||
newer](/docker-for-mac/install.md#download-docker-for-mac).
|
||||
|
||||
On releases with the workaround included to filter out / truncate IPv6 addresses from the DNS list, the above command should run properly:
|
||||
|
||||
|
||||
$ docker pull busybox
|
||||
Using default tag: latest
|
||||
latest: Pulling from library/busybox
|
||||
Digest: sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6
|
||||
Status: Image is up to date for busy box:latest
|
||||
On releases with the workaround included to filter out / truncate IPv6
|
||||
addresses from the DNS list, the above command should run properly:
|
||||
|
||||
```
|
||||
$ docker pull busybox
|
||||
Using default tag: latest
|
||||
latest: Pulling from library/busybox
|
||||
Digest: sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6
|
||||
Status: Image is up to date for busy box:latest
|
||||
```
|
||||
|
||||
To learn more, see these issues on GitHub and Docker for Mac forums:
|
||||
|
||||
* [Network timeout when top two DNS servers in /etc/resolv.conf are IPv6 addresses](https://github.com/docker/for-mac/issues/9)
|
||||
* [Network timeout when top two DNS servers in /etc/resolv.conf are IPv6
|
||||
addresses](https://github.com/docker/for-mac/issues/9)
|
||||
|
||||
* [ERROR: Network timed out while trying to connect to index.docker.io](https://forums.docker.com/t/error-network-timed-out-while-trying-to-connect-to-index-docker-io/17206)
|
||||
* [ERROR: Network timed out while trying to connect to
|
||||
index.docker.io](https://forums.docker.com/t/error-network-timed-out-while-trying-to-connect-to-index-docker-io/17206)
|
||||
|
||||
<p></p>
|
||||
|
||||
* If Docker for Mac fails to install or start properly:
|
||||
|
||||
* Make sure you quit Docker for Mac before installing a new version
|
||||
of the application ( {: .inline} --> **Quit Docker**). Otherwise, you get an
|
||||
"application in use" error when you try to copy the new app
|
||||
from the `.dmg` to `/Applications`.
|
||||
* Make sure you quit Docker for Mac before installing a new version of the
|
||||
application ( {: .inline} -->
|
||||
**Quit Docker**). Otherwise, you get an "application in use" error when you
|
||||
try to copy the new app from the `.dmg` to `/Applications`.
|
||||
|
||||
* Restart your Mac to stop / discard any vestige of the daemon running from the previously installed version.
|
||||
* Restart your Mac to stop / discard any vestige of the daemon running from
|
||||
the previously installed version.
|
||||
|
||||
* Run the uninstall commands from the menu.
|
||||
|
||||
|
@ -295,84 +326,107 @@ know before you install](install.md#what-to-know-before-you-install).
|
|||
|
||||
* If you use bash, use the following command: `unset ${!DOCKER_*}`
|
||||
|
||||
* For other shells, unset each environment variable individually as described in [Setting up to run Docker for Mac](docker-toolbox.md#setting-up-to-run-docker-for-mac) in [Docker for Mac vs. Docker Toolbox](docker-toolbox.md).
|
||||
* For other shells, unset each environment variable individually as described
|
||||
in [Setting up to run Docker for
|
||||
Mac](docker-toolbox.md#setting-up-to-run-docker-for-mac) in [Docker for Mac
|
||||
vs. Docker Toolbox](docker-toolbox.md).
|
||||
|
||||
|
||||
* Network connections fail if the macOS Firewall is set to
|
||||
"Block all incoming connections". You can enable the firewall, but `bootpd` must be allowed incoming connections so that the VM can get an IP address.
|
||||
* Network connections fail if the macOS Firewall is set to "Block all incoming
|
||||
connections". You can enable the firewall, but `bootpd` must be allowed
|
||||
incoming connections so that the VM can get an IP address.
|
||||
|
||||
|
||||
* For the `hello-world-nginx` example, Docker for Mac must be running to get to the webserver on `http://localhost/`. Make sure that the Docker whale
|
||||
is showing in the menu bar, and that you run the Docker commands in a shell that
|
||||
is connected to the Docker for Mac Engine (not Engine from Toolbox). Otherwise,
|
||||
you might start the webserver container but get a "web page not available" error
|
||||
when you go to `localhost`. For more on distinguishing between the two
|
||||
environments, see [Docker for Mac vs. Docker Toolbox](docker-toolbox.md).
|
||||
* For the `hello-world-nginx` example, Docker for Mac must be running to get to
|
||||
the webserver on `http://localhost/`. Make sure that the Docker whale is
|
||||
showing in the menu bar, and that you run the Docker commands in a shell that
|
||||
is connected to the Docker for Mac Engine (not Engine from
|
||||
Toolbox). Otherwise, you might start the webserver container but get a "web
|
||||
page not available" error when you go to `localhost`. For more on
|
||||
distinguishing between the two environments, see [Docker for Mac vs. Docker
|
||||
Toolbox](docker-toolbox.md).
|
||||
|
||||
<p></p>
|
||||
|
||||
* If you see errors like `Bind for 0.0.0.0:8080 failed: port is already allocated` or `listen tcp:0.0.0.0:8080: bind: address is already in use`:
|
||||
* If you see errors like `Bind for 0.0.0.0:8080 failed: port is already
|
||||
allocated` or `listen tcp:0.0.0.0:8080: bind: address is already in use`:
|
||||
|
||||
* These errors are often caused by some other software on the Mac using those
|
||||
ports.
|
||||
ports.
|
||||
|
||||
* Run `lsof -i tcp:8080` to discover the name and pid of the other process and
|
||||
decide whether to shut the other process down, or to use a different port in
|
||||
your docker app.
|
||||
decide whether to shut the other process down, or to use a different port in
|
||||
your docker app.
|
||||
|
||||
## Known issues
|
||||
|
||||
* IPv6 is not yet supported on Docker for Mac. If you are using IPv6, and haven't upgraded to Beta 24 or v1.12.1 stable or newer, you see a network
|
||||
timeout when you run `docker` commands that need access to external network
|
||||
servers. The aforementioned releases include a workaround for this because
|
||||
Docker for Mac does not yet support IPv6. See "IPv6 workaround to auto-filter DNS addresses" in
|
||||
[Workarounds for common problems](troubleshoot.md#workarounds-for-common-problems).
|
||||
|
||||
|
||||
* You might encounter errors when using `docker-compose up` with Docker for Mac (`ValueError: Extra Data`). We've identified this is likely related to data and/or events being passed all at once rather than one by one, so sometimes the data comes back as 2+ objects concatenated and causes an error.
|
||||
* IPv6 is not yet supported on Docker for Mac. If you are using IPv6, and
|
||||
haven't upgraded to Beta 24 or v1.12.1 stable or newer, you see a network
|
||||
timeout when you run `docker` commands that need access to external network
|
||||
servers. The aforementioned releases include a workaround for this because
|
||||
Docker for Mac does not yet support IPv6. See "IPv6 workaround to auto-filter
|
||||
DNS addresses" in [Workarounds for common
|
||||
problems](troubleshoot.md#workarounds-for-common-problems).
|
||||
|
||||
* You might encounter errors when using `docker-compose up` with Docker for Mac
|
||||
(`ValueError: Extra Data`). We've identified this is likely related to data
|
||||
and/or events being passed all at once rather than one by one, so sometimes
|
||||
the data comes back as 2+ objects concatenated and causes an error.
|
||||
|
||||
* Force-ejecting the `.dmg` after running `Docker.app` from it can cause the
|
||||
whale icon to become unresponsive, Docker tasks to show as not responding in
|
||||
the Activity Monitor, and for some processes to consume a large amount of CPU
|
||||
resources. Reboot and restart Docker to resolve these issues.
|
||||
|
||||
* Docker does not auto-start on login even when it is enabled in
|
||||
{: .inline} --> **Preferences**. This is related to a set of issues with Docker
|
||||
helper, registration, and versioning.
|
||||
* Docker does not auto-start on login even when it is enabled in {: .inline} --> **Preferences**. This
|
||||
is related to a set of issues with Docker helper, registration, and
|
||||
versioning.
|
||||
|
||||
<p></p>
|
||||
|
||||
* Docker for Mac uses the `HyperKit` hypervisor (https://github.com/docker/hyperkit) in macOS 10.10 Yosemite and higher. If you
|
||||
are developing with tools that have conflicts with `HyperKit`, such as [Intel
|
||||
Hardware Accelerated Execution Manager
|
||||
(HAXM)](https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager/),
|
||||
the current workaround is not to run them at the same time. You can pause
|
||||
`HyperKit` by quitting Docker for Mac temporarily while you work with HAXM. This
|
||||
allows you to continue work with the other tools and prevent `HyperKit` from
|
||||
interfering.
|
||||
* Docker for Mac uses the `HyperKit` hypervisor
|
||||
(https://github.com/docker/hyperkit) in macOS 10.10 Yosemite and higher. If
|
||||
you are developing with tools that have conflicts with `HyperKit`, such as
|
||||
[Intel Hardware Accelerated Execution Manager
|
||||
(HAXM)](https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager/),
|
||||
the current workaround is not to run them at the same time. You can pause
|
||||
`HyperKit` by quitting Docker for Mac temporarily while you work with
|
||||
HAXM. This allows you to continue work with the other tools and prevent
|
||||
`HyperKit` from interfering.
|
||||
|
||||
|
||||
* If you are working with applications like [Apache Maven](https://maven.apache.org/) that expect settings for `DOCKER_HOST` and `DOCKER_CERT_PATH` environment variables, specify these to connect to Docker instances through Unix sockets. For example:
|
||||
* If you are working with applications like [Apache
|
||||
Maven](https://maven.apache.org/) that expect settings for `DOCKER_HOST` and
|
||||
`DOCKER_CERT_PATH` environment variables, specify these to connect to Docker
|
||||
instances through Unix sockets. For example:
|
||||
|
||||
export DOCKER_HOST=unix:///var/run/docker.sock
|
||||
```bash
|
||||
export DOCKER_HOST=unix:///var/run/docker.sock
|
||||
```
|
||||
|
||||
* `docker-compose` 1.7.1 performs DNS unnecessary lookups for `localunixsocket.local` which can take 5s to timeout on some networks. If `docker-compose` commands seem very slow but seem to speed up when the network is disabled, try appending `127.0.0.1 localunixsocket.local` to the file `/etc/hosts`.
|
||||
Alternatively you could create a plain-text TCP proxy on localhost:1234 using:
|
||||
* `docker-compose` 1.7.1 performs DNS unnecessary lookups for
|
||||
`localunixsocket.local` which can take 5s to timeout on some networks. If
|
||||
`docker-compose` commands seem very slow but seem to speed up when the network
|
||||
is disabled, try appending `127.0.0.1 localunixsocket.local` to the file
|
||||
`/etc/hosts`. Alternatively you could create a plain-text TCP proxy on
|
||||
localhost:1234 using:
|
||||
|
||||
docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 127.0.0.1:1234:1234 bobrik/socat TCP-LISTEN:1234,fork UNIX-CONNECT:/var/run/docker.sock
|
||||
```
|
||||
docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 127.0.0.1:1234:1234 bobrik/socat TCP-LISTEN:1234,fork UNIX-CONNECT:/var/run/docker.sock
|
||||
```
|
||||
|
||||
and then `export DOCKER_HOST=tcp://localhost:1234`.
|
||||
and then `export DOCKER_HOST=tcp://localhost:1234`.
|
||||
|
||||
|
||||
<a name="bind-mounted-dirs"></a>
|
||||
|
||||
* There are a number of issues with the performance of directories
|
||||
bind-mounted with `osxfs`. In particular, writes of small blocks, and
|
||||
traversals of large directories are currently slow. Additionally,
|
||||
containers that perform large numbers of directory operations, such as
|
||||
repeated scans of large directory trees, may suffer from poor
|
||||
performance. Applications that behave in this way include:
|
||||
* There are a number of issues with the performance of directories bind-mounted
|
||||
with `osxfs`. In particular, writes of small blocks, and traversals of large
|
||||
directories are currently slow. Additionally, containers that perform large
|
||||
numbers of directory operations, such as repeated scans of large directory
|
||||
trees, may suffer from poor performance. Applications that behave in this way
|
||||
include:
|
||||
|
||||
- `rake`
|
||||
- `ember build`
|
||||
|
@ -382,23 +436,32 @@ Alternatively you could create a plain-text TCP proxy on localhost:1234 using:
|
|||
- PHP applications that use [Composer](https://getcomposer.org) to install dependencies in a ```vendor``` folder<br><br>
|
||||
|
||||
As a work-around for this behavior, you can put vendor or third-party library
|
||||
directories in Docker volumes, perform temporary file system operations outside
|
||||
of `osxfs` mounts, and use third-party tools like Unison or `rsync` to
|
||||
synchronize between container directories and bind-mounted directories. We are
|
||||
actively working on `osxfs` performance using a number of different techniques.
|
||||
To learn more, see the topic on [Performance issues, solutions, and
|
||||
roadmap](osxfs.md#performance-issues-solutions-and-roadmap).
|
||||
directories in Docker volumes, perform temporary file system operations
|
||||
outside of `osxfs` mounts, and use third-party tools like Unison or `rsync` to
|
||||
synchronize between container directories and bind-mounted directories. We are
|
||||
actively working on `osxfs` performance using a number of different
|
||||
techniques. To learn more, see the topic on [Performance issues, solutions,
|
||||
and roadmap](osxfs.md#performance-issues-solutions-and-roadmap).
|
||||
|
||||
* If your system does not have access to an NTP server, then after a hibernate the time seen by Docker for Mac may be considerably out of sync with the host. Furthermore, the time may slowly drift out of sync during use. To manually reset the time after hibernation, run:
|
||||
* If your system does not have access to an NTP server, then after a hibernate
|
||||
the time seen by Docker for Mac may be considerably out of sync with the
|
||||
host. Furthermore, the time may slowly drift out of sync during use. To
|
||||
manually reset the time after hibernation, run:
|
||||
|
||||
docker run --rm --privileged alpine hwclock -s
|
||||
```bash
|
||||
docker run --rm --privileged alpine hwclock -s
|
||||
```
|
||||
|
||||
Or, to resolve both issues, you can add the local clock as a low-priority (high stratum) fallback NTP time source for the host. To do this, edit the host's `/etc/ntp-restrict.conf` to add:
|
||||
Or, to resolve both issues, you can add the local clock as a low-priority (high stratum) fallback NTP time source for the host. To do this, edit the host's `/etc/ntp-restrict.conf` to add:
|
||||
|
||||
server 127.127.1.1 # LCL, local clock
|
||||
fudge 127.127.1.1 stratum 12 # increase stratum
|
||||
```
|
||||
server 127.127.1.1 # LCL, local clock
|
||||
fudge 127.127.1.1 stratum 12 # increase stratum
|
||||
```
|
||||
|
||||
Then restart the NTP service with:
|
||||
Then restart the NTP service with:
|
||||
|
||||
sudo launchctl unload /System/Library/LaunchDaemons/org.ntp.ntpd.plist
|
||||
sudo launchctl load /System/Library/LaunchDaemons/org.ntp.ntpd.plist
|
||||
```bash
|
||||
sudo launchctl unload /System/Library/LaunchDaemons/org.ntp.ntpd.plist
|
||||
sudo launchctl load /System/Library/LaunchDaemons/org.ntp.ntpd.plist
|
||||
```
|
||||
|
|
|
@ -11,16 +11,16 @@ technical support for various subscription levels, and more.
|
|||
|
||||
### Questions about Stable and Edge channels
|
||||
|
||||
**Q: How do I get the Stable or Edge version of Docker for Windows?**
|
||||
#### How do I get the Stable or Edge version of Docker for Windows?
|
||||
|
||||
A: Use the download links for the channels given in the topic
|
||||
[Download Docker for Windows](/docker-for-windows/install.md#download-docker-for-windows).
|
||||
Use the download links for the channels given in the topic [Download Docker for
|
||||
Windows](/docker-for-windows/install.md#download-docker-for-windows).
|
||||
|
||||
This topic also has more information about the two channels.
|
||||
|
||||
**Q: What is the difference between the Stable and Edge versions of Docker for Windows?**
|
||||
#### What is the difference between the Stable and Edge versions of Docker for Windows?
|
||||
|
||||
A: Two different download channels are available for Docker for Windows:
|
||||
Two different download channels are available for Docker for Windows:
|
||||
|
||||
* The **Stable channel** provides a general availability release-ready installer
|
||||
for a fully baked and tested, more reliable app. The Stable version of Docker
|
||||
|
@ -36,13 +36,13 @@ A: Two different download channels are available for Docker for Windows:
|
|||
Stable, often one or more per month. Usage statistics and crash reports are
|
||||
sent by default. You do not have the option to disable this on the Edge channel.
|
||||
|
||||
**Q: Can I switch back and forth between Stable and Edge versions of Docker for Windows?**
|
||||
#### Can I switch back and forth between Stable and Edge versions of Docker for Windows?
|
||||
|
||||
A: Yes, you can switch between versions to try out the Edge release to see
|
||||
what's new, then go back to Stable for other work. However, **you can have only
|
||||
one app installed at a time**. Switching back and forth between Stable and Edge
|
||||
apps can destabilize your development environment, particularly in cases where
|
||||
you switch from a newer (Edge) channel to older (Stable).
|
||||
Yes, you can switch between versions to try out the Edge release to see what's
|
||||
new, then go back to Stable for other work. However, **you can have only one app
|
||||
installed at a time**. Switching back and forth between Stable and Edge apps can
|
||||
destabilize your development environment, particularly in cases where you switch
|
||||
from a newer (Edge) channel to older (Stable).
|
||||
|
||||
For example, containers created with a newer Edge version of Docker for Windows
|
||||
may not work after you switch back to Stable because they may have been created
|
||||
|
@ -69,7 +69,9 @@ Do the following each time:
|
|||
|
||||
4. Install a different version of the app (Stable or Edge).
|
||||
|
||||
### What kind of feedback are we looking for?
|
||||
|
||||
### Feeback
|
||||
#### What kind of feedback are we looking for?
|
||||
|
||||
Everything is fair game. We'd like your impressions on the download-install
|
||||
process, startup, functionality available, the GUI, usefulness of the app,
|
||||
|
@ -80,7 +82,7 @@ We are especially interested in getting feedback on the new swarm mode described
|
|||
in [Docker Swarm](/engine/swarm/index.md). A good place to start is the
|
||||
[tutorial](/engine/swarm/swarm-tutorial/index.md).
|
||||
|
||||
### What if I have problems or questions?
|
||||
#### What if I have problems or questions?
|
||||
|
||||
You can find the list of frequent issues in
|
||||
[Logs and Troubleshooting](/docker-for-windows/troubleshoot.md).
|
||||
|
@ -96,20 +98,20 @@ provides discussion threads as well, and you can create discussion topics there,
|
|||
but we recommend using the GitHub issues over the forums for better tracking and
|
||||
response.
|
||||
|
||||
### How can I opt out of sending my usage data?
|
||||
#### How can I opt out of sending my usage data?
|
||||
|
||||
If you do not want auto-send of usage data, use the Stable channel. For more
|
||||
information, see [Stable and Edge channels](#questions-about-stable-and-edge-channels) ("What is the difference between the Stable and Edge versions of Docker for Windows?").
|
||||
|
||||
### Can I use Docker for Windows with new swarm mode?
|
||||
|
||||
Yes! You can use Docker for Windows to test single-node features of
|
||||
[swarm mode](/engine/swarm/index.md) introduced with Docker Engine 1.12, including
|
||||
Yes! You can use Docker for Windows to test single-node features of [swarm
|
||||
mode](/engine/swarm/index.md) introduced with Docker Engine 1.12, including
|
||||
initializing a swarm with a single node, creating services, and scaling
|
||||
services. Docker “Moby” on Hyper-V serves as the single swarm node. You can
|
||||
also use Docker Machine, which comes with Docker for Windows, to create and
|
||||
experiment with a multi-node swarm. Check out the tutorial at
|
||||
[Get started with swarm mode](/engine/swarm/swarm-tutorial/index.md).
|
||||
services. Docker “Moby” on Hyper-V serves as the single swarm node. You can also
|
||||
use Docker Machine, which comes with Docker for Windows, to create and
|
||||
experiment with a multi-node swarm. Check out the tutorial at [Get started with
|
||||
swarm mode](/engine/swarm/swarm-tutorial/index.md).
|
||||
|
||||
### How do I connect to the remote Docker Engine API?
|
||||
|
||||
|
@ -123,28 +125,29 @@ See also [Docker Engine API](/engine/api.md) and the Docker for Windows forums
|
|||
topic
|
||||
[How to find the remote API](https://forums.docker.com/t/how-to-find-the-remote-api/20988).
|
||||
|
||||
### Can I change permissions on shared volumes for container-specific deployment requirements?
|
||||
### Volumes
|
||||
#### Can I change permissions on shared volumes for container-specific deployment requirements?
|
||||
|
||||
No, at this point, Docker for Windows does not enable you to control (`chmod`)
|
||||
the Unix-style permissions on [shared
|
||||
volumes](/docker-for-windows/index.md#shared-drives) for deployed containers,
|
||||
but rather sets permissions to a default value of
|
||||
[0755](http://permissions-calculator.org/decode/0755/)
|
||||
(`read`, `write`, `execute` permissions for `user`, `read` and `execute`
|
||||
for `group`) which is not configurable.
|
||||
[0755](http://permissions-calculator.org/decode/0755/) (`read`, `write`,
|
||||
`execute` permissions for `user`, `read` and `execute` for `group`) which is not
|
||||
configurable.
|
||||
|
||||
For workarounds and to learn more, see [Permissions errors on data
|
||||
directories for shared
|
||||
For workarounds and to learn more, see [Permissions errors on data directories
|
||||
for shared
|
||||
volumes](troubleshoot.md#permissions-errors-on-data-directories-for-shared-volumes).
|
||||
|
||||
### Why doesn't `nodemon` pick up file changes in a container mounted on a shared drive?
|
||||
#### Why doesn't `nodemon` pick up file changes in a container mounted on a shared drive?
|
||||
|
||||
Currently, `inotify` does not work on Docker for Windows. This is a known issue.
|
||||
For more information and a temporary workaround, see [inotify on shared drives
|
||||
does not work](troubleshoot.md#inotify-on-shared-drives-does-not-work) in
|
||||
[Troubleshooting](/docker-for-windows/troubleshoot.md).
|
||||
|
||||
### Are symlinks supported?
|
||||
#### Are symlinks supported?
|
||||
|
||||
Docker for Windows supports symbolic links (symlinks) created within containers.
|
||||
Symlinks resolve within and across containers.
|
||||
|
@ -158,7 +161,10 @@ To learn more about the reasons for this limitation, see the following discussio
|
|||
* Docker for Windows forums topic:
|
||||
[Symlinks on shared volumes not supported](https://forums.docker.com/t/symlinks-on-shared-volumes-not-supported/9288)
|
||||
|
||||
### How do I add custom CA certificates?
|
||||
|
||||
### Certificates
|
||||
|
||||
#### How do I add custom CA certificates?
|
||||
|
||||
Starting with Docker for Windows 1.12.1, 2016-09-16 (Stable) and Beta 26
|
||||
(2016-09-14 1.12.1-beta26), all trusted Certificate Authorities (CA) (root or
|
||||
|
@ -174,7 +180,7 @@ To learn more about how to install a CA root certificate for the registry, see
|
|||
[Verify repository client with certificates](/engine/security/certificates.md)
|
||||
in the Docker Engine topics.
|
||||
|
||||
### How do I add client certificates?
|
||||
#### How do I add client certificates?
|
||||
|
||||
Starting with Docker for Windows 17.06.0-ce, you do not need to push your
|
||||
certificates with `git` commands anymore. You can put your client certificates
|
||||
|
@ -185,16 +191,14 @@ When the Docker for Windows application starts up, it copies the
|
|||
`~/.docker/certs.d` folder on your Windows system to the `/etc/docker/certs.d`
|
||||
directory on Moby (the Docker for Windows virtual machine running on Hyper-V).
|
||||
|
||||
> * You need to restart Docker for Windows after making any changes to
|
||||
the keychain or to the `~/.docker/certs.d` directory in order for
|
||||
the changes to take effect.
|
||||
>
|
||||
> * The registry cannot be listed as an _insecure registry_ (see [Docker
|
||||
Daemon](/docker-for-windows/index.md#docker-daemon)). Docker for Windows
|
||||
ignores certificates listed under insecure registries, and does not send client
|
||||
certificates. Commands like `docker run` that attempt to pull from
|
||||
the registry produce error messages on the command line, as well as on the
|
||||
registry.
|
||||
You need to restart Docker for Windows after making any changes to the keychain
|
||||
or to the `~/.docker/certs.d` directory in order for the changes to take effect.
|
||||
|
||||
The registry cannot be listed as an _insecure registry_ (see [Docker
|
||||
Daemon](/docker-for-windows/index.md#docker-daemon)). Docker for Windows ignores
|
||||
certificates listed under insecure registries, and does not send client
|
||||
certificates. Commands like `docker run` that attempt to pull from the registry
|
||||
produce error messages on the command line, as well as on the registry.
|
||||
|
||||
To learn more about how to set the client TLS certificate for verification, see
|
||||
[Verify repository client with certificates](/engine/security/certificates.md)
|
||||
|
@ -202,7 +206,7 @@ in the Docker Engine topics.
|
|||
|
||||
### Why does Docker for Windows sometimes lose network connectivity, causing `push` or `pull` commands to fail?
|
||||
|
||||
Networking is not yet fully Stable across network changes and system sleep
|
||||
Networking is not yet fully stable across network changes and system sleep
|
||||
cycles. Exit and start Docker to restore connectivity.
|
||||
|
||||
### Can I use VirtualBox alongside Docker 4 Windows?
|
||||
|
@ -221,11 +225,15 @@ For more about sharing local drives with containers using Docker for Windows,
|
|||
see [Shared Drives](/docker-for-windows/index.md#shared-drives) in the Getting
|
||||
Started topic.
|
||||
|
||||
To learn more about using Docker for Windows and Docker Machine, see
|
||||
[What to know before you install](install.md#what-to-know-before-you-install) in the Getting Started topic. For more about Docker Machine itself, see
|
||||
[What is Docker Machine?](/machine/overview.md#what-is-docker-machine), and the [Hyper-V driver](/machine/drivers/hyper-v.md) for Docker Machine.
|
||||
To learn more about using Docker for Windows and Docker Machine, see [What to
|
||||
know before you install](install.md#what-to-know-before-you-install) in the
|
||||
Getting Started topic. For more about Docker Machine itself, see [What is Docker
|
||||
Machine?](/machine/overview.md#what-is-docker-machine), and the [Hyper-V
|
||||
driver](/machine/drivers/hyper-v.md) for Docker Machine.
|
||||
|
||||
### How do I run Windows containers on Docker on Windows Server 2016?
|
||||
### Windows Requirements
|
||||
|
||||
#### How do I run Windows containers on Docker on Windows Server 2016?
|
||||
|
||||
See [About Windows containers and Windows Server
|
||||
2016](/docker-for-windows/index.md#about-windows-containers-and-windows-server-2016).
|
||||
|
@ -234,28 +242,30 @@ A full tutorial is available in [docker/labs](https://github.com/docker/labs) at
|
|||
[Getting Started with Windows
|
||||
Containers](https://github.com/docker/labs/blob/master/windows/windows-containers/README.md).
|
||||
|
||||
### Why is Windows 10 Home not supported?
|
||||
#### Why is Windows 10 Home not supported?
|
||||
|
||||
Docker for Windows requires the Hyper-V Windows feature which is not
|
||||
available on Home-edition.
|
||||
|
||||
### Why is Windows 10 required?
|
||||
#### Why is Windows 10 required?
|
||||
|
||||
Docker for Windows uses Windows Hyper-V. While older Windows versions have
|
||||
Hyper-V, their Hyper-V implementations lack features critical for Docker for
|
||||
Windows to work.
|
||||
|
||||
### Why does Docker for Windows fail to start when firewalls or anti-virus software is installed?
|
||||
#### Why does Docker for Windows fail to start when firewalls or anti-virus software is installed?
|
||||
|
||||
Some firewalls and anti-virus software might be incompatible with Hyper-V and
|
||||
some Windows 10 builds (possibly, the Anniversary Update), which impacts Docker
|
||||
for Windows. See details and workarounds in
|
||||
[Docker fails to start when firewall or anti-virus software is installed](troubleshoot.md#docker-fails-to-start-when-firewall-or-anti-virus-software-is-installed)
|
||||
for Windows. See details and workarounds in [Docker fails to start when firewall
|
||||
or anti-virus software is
|
||||
installed](troubleshoot.md#docker-fails-to-start-when-firewall-or-anti-virus-software-is-installed)
|
||||
in [Troubleshooting](/docker-for-windows/troubleshoot.md).
|
||||
|
||||
### How do I uninstall Docker Toolbox?
|
||||
|
||||
You might decide that you do not need Toolbox now that you have Docker for Windows, and want to uninstall it. For
|
||||
details on how to perform a clean uninstall of Toolbox on Windows, see
|
||||
[How to uninstall Toolbox](/toolbox/toolbox_install_windows.md#how-to-uninstall-toolbox)
|
||||
in the Toolbox Windows topics.
|
||||
You might decide that you do not need Toolbox now that you have Docker for
|
||||
Windows, and want to uninstall it. For details on how to perform a clean
|
||||
uninstall of Toolbox on Windows, see [How to uninstall
|
||||
Toolbox](/toolbox/toolbox_install_windows.md#how-to-uninstall-toolbox) in the
|
||||
Toolbox Windows topics.
|
||||
|
|
|
@ -23,12 +23,13 @@ documentation, on [Docker for Windows issues on
|
|||
GitHub](https://github.com/docker/for-win/issues), or the [Docker for Windows
|
||||
forum](https://forums.docker.com/c/docker-for-windows), we can help you
|
||||
troubleshoot the log data. See [Diagnose and
|
||||
Feedback](/docker-for-windows/index.md#diagnose-and-feedback) to learn about diagnostics and how to
|
||||
create new issues on GitHub.
|
||||
Feedback](/docker-for-windows/index.md#diagnose-and-feedback) to learn about
|
||||
diagnostics and how to create new issues on GitHub.
|
||||
|
||||
## Checking the Logs
|
||||
|
||||
In addition to using the diagnose and feedback option to submit logs, you can browse the logs yourself.
|
||||
In addition to using the diagnose and feedback option to submit logs, you can
|
||||
browse the logs yourself.
|
||||
|
||||
### Use the systray menu to view logs
|
||||
|
||||
|
@ -39,19 +40,19 @@ history of logs in your `AppData\Local` folder.
|
|||
### Use the systray menu to report and issue
|
||||
|
||||
If you encounter an issue and the suggested troubleshoot procedures outlined
|
||||
below don't fix it you can generate a diagnostics report. Click on the `Diagnose &
|
||||
Feedback` menu entry in the systray and then on the `Upload diagnostic...` link.
|
||||
This uploads diagnostics to our server and provide you with a unique ID you
|
||||
can use in email or the forum to reference the upload.
|
||||
below don't fix it you can generate a diagnostics report. Click on the `Diagnose
|
||||
& Feedback` menu entry in the systray and then on the `Upload diagnostic...`
|
||||
link. This uploads diagnostics to our server and provide you with a unique ID
|
||||
you can use in email or the forum to reference the upload.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Make sure certificates are set up correctly
|
||||
|
||||
Docker for Windows ignores certificates listed under insecure registries,
|
||||
and does not send client certificates to them. Commands like `docker run` that
|
||||
attempt to pull from the registry produces error messages on the command
|
||||
line, like this:
|
||||
Docker for Windows ignores certificates listed under insecure registries, and
|
||||
does not send client certificates to them. Commands like `docker run` that
|
||||
attempt to pull from the registry produces error messages on the command line,
|
||||
like this:
|
||||
|
||||
```
|
||||
Error response from daemon: Get http://192.168.203.139:5858/v2/: malformed HTTP response "\x15\x03\x01\x00\x02\x02"
|
||||
|
@ -70,7 +71,9 @@ certificates) and [How do I add client
|
|||
certificates?](/docker-for-windows/index.md#how-do-i-add-client-certificates) in
|
||||
the Getting Started topic.
|
||||
|
||||
### Permissions errors on data directories for shared volumes
|
||||
### Volumes
|
||||
|
||||
#### Permissions errors on data directories for shared volumes
|
||||
|
||||
Docker for Windows sets permissions on [shared
|
||||
volumes](/docker-for-windows/index.md#shared-drives) to a default value of
|
||||
|
@ -101,42 +104,46 @@ in the FAQs, and for more of an explanation, the GitHub issue, [Controlling
|
|||
Unix-style perms on directories passed through from shared Windows
|
||||
drives](https://github.com/docker/docker.github.io/issues/3298).
|
||||
|
||||
### inotify on shared drives does not work
|
||||
#### inotify on shared drives does not work
|
||||
|
||||
Currently, `inotify` does not work on Docker for Windows. This becomes
|
||||
evident, for example, when an application needs to read/write to a
|
||||
container across a mounted drive. Instead of relying on filesystem inotify, we recommend using polling features for your framework or programming language.
|
||||
Currently, `inotify` does not work on Docker for Windows. This becomes evident,
|
||||
for example, when an application needs to read/write to a container across a
|
||||
mounted drive. Instead of relying on filesystem inotify, we recommend using
|
||||
polling features for your framework or programming language.
|
||||
|
||||
* **Workaround for nodemon and Node.js** - If you are using [nodemon](https://github.com/remy/nodemon) with `Node.js`, try the fallback
|
||||
polling mode described here: [nodemon isn't restarting node
|
||||
applications](https://github.com/remy/nodemon#application-isnt-restarting)
|
||||
* **Workaround for nodemon and Node.js** - If you are using
|
||||
[nodemon](https://github.com/remy/nodemon) with `Node.js`, try the fallback
|
||||
polling mode described here: [nodemon isn't restarting node
|
||||
applications](https://github.com/remy/nodemon#application-isnt-restarting)
|
||||
|
||||
* **Docker for Windows issue on GitHub** - See the issue [Inotify on shared drives does not work](https://github.com/docker/for-win/issues/56#issuecomment-242135705)
|
||||
* **Docker for Windows issue on GitHub** - See the issue [Inotify on shared
|
||||
drives does not
|
||||
work](https://github.com/docker/for-win/issues/56#issuecomment-242135705)
|
||||
|
||||
### Volume mounting requires shared drives for Linux containers
|
||||
#### Volume mounting requires shared drives for Linux containers
|
||||
|
||||
If you are using mounted volumes and get runtime errors indicating an
|
||||
application file is not found, access is denied to a volume mount, or a service
|
||||
cannot start, such as when using [Docker Compose](/compose/gettingstarted.md),
|
||||
you might need to enable [shared drives](/docker-for-windows/index.md#shared-drives).
|
||||
you might need to enable [shared
|
||||
drives](/docker-for-windows/index.md#shared-drives).
|
||||
|
||||
Volume mounting requires shared drives for Linux containers
|
||||
(not for Windows containers). Go to
|
||||
{: .inline} -->
|
||||
**Settings** --> **Shared Drives** and share the drive that
|
||||
contains the Dockerfile and volume.
|
||||
Volume mounting requires shared drives for Linux containers (not for Windows
|
||||
containers). Go to {: .inline}
|
||||
--> **Settings** --> **Shared Drives** and share the drive that contains the
|
||||
Dockerfile and volume.
|
||||
|
||||
### Verify domain user has permissions for shared drives (volumes)
|
||||
#### Verify domain user has permissions for shared drives (volumes)
|
||||
|
||||
>**Tip**: Shared drives are only required for volume mounting [Linux
|
||||
containers](/docker-for-windows/index.md#switch-between-windows-and-linux-containers),
|
||||
not Windows containers.
|
||||
> **Tip**: Shared drives are only required for volume mounting [Linux
|
||||
> containers](/docker-for-windows/index.md#switch-between-windows-and-linux-containers),
|
||||
> not Windows containers.
|
||||
|
||||
Permissions to access shared drives are tied to the username and password you
|
||||
use to set up [shared drives](/docker-for-windows/index.md#shared-drives). If you run `docker`
|
||||
commands and tasks under a different username than the one used to set up shared
|
||||
drives, your containers don't have permissions to access the mounted volumes.
|
||||
The volumes show as empty.
|
||||
use to set up [shared drives](/docker-for-windows/index.md#shared-drives). If
|
||||
you run `docker` commands and tasks under a different username than the one used
|
||||
to set up shared drives, your containers don't have permissions to access the
|
||||
mounted volumes. The volumes show as empty.
|
||||
|
||||
The solution to this is to switch to the domain user account and reset
|
||||
credentials on shared drives.
|
||||
|
@ -149,35 +156,44 @@ local user is `samstevens` and the domain user is `merlin`.
|
|||
|
||||
2. Run `net share c` to view user permissions for `<host>\<username>, FULL`.
|
||||
|
||||
PS C:\Users\jdoe> net share c
|
||||
Share name C
|
||||
Path C:\
|
||||
Remark
|
||||
Maximum users No limit
|
||||
Users SAMSTEVENS
|
||||
Caching Caching disabled
|
||||
Permission windowsbox\samstevens, FULL
|
||||
```
|
||||
PS C:\Users\jdoe> net share c
|
||||
Share name C
|
||||
Path C:\
|
||||
Remark
|
||||
Maximum users No limit
|
||||
Users SAMSTEVENS
|
||||
Caching Caching disabled
|
||||
Permission windowsbox\samstevens, FULL
|
||||
```
|
||||
|
||||
3. Run the following command to remove the share.
|
||||
|
||||
net share c /delete
|
||||
```
|
||||
net share c /delete
|
||||
```
|
||||
|
||||
4. Re-share the drive via the [Shared Drives dialog](/docker-for-windows/index.md#shared-drives), and provide the Windows domain user account credentials.
|
||||
4. Re-share the drive via the [Shared Drives
|
||||
dialog](/docker-for-windows/index.md#shared-drives), and provide the Windows
|
||||
domain user account credentials.
|
||||
|
||||
5. Re-run `net share c`.
|
||||
|
||||
PS C:\Users\jdoe> net share c
|
||||
Share name C
|
||||
Path C:\
|
||||
Remark
|
||||
Maximum users No limit
|
||||
Users MERLIN
|
||||
Caching Caching disabled
|
||||
Permission windowsbox\merlin, FULL
|
||||
```
|
||||
PS C:\Users\jdoe> net share c
|
||||
Share name C
|
||||
Path C:\
|
||||
Remark
|
||||
Maximum users No limit
|
||||
Users MERLIN
|
||||
Caching Caching disabled
|
||||
Permission windowsbox\merlin, FULL
|
||||
```
|
||||
|
||||
See also, the related issue on GitHub, [Mounted volumes are empty in the container](https://github.com/docker/for-win/issues/25).
|
||||
See also, the related issue on GitHub, [Mounted volumes are empty in the
|
||||
container](https://github.com/docker/for-win/issues/25).
|
||||
|
||||
### Volume mounts from host paths use a `nobrl` option to override database locking
|
||||
#### Volume mounts from host paths use a `nobrl` option to override database locking
|
||||
|
||||
You may encounter problems using volume mounts on the host, depending on the
|
||||
database software and which options are enabled. Docker for Windows uses
|
||||
|
@ -193,10 +209,9 @@ can interfere with other aspects of database functionality (for example,
|
|||
write-ahead logging (WAL) with SQLite, as described in
|
||||
[docker/for-win#1886](https://github.com/Sonarr/Sonarr/issues/1886)).
|
||||
|
||||
If possible, avoid using shared drives for volume mounts on the host with network paths, and
|
||||
instead mount on the MobyVM, or create a [data
|
||||
volume](/engine/tutorials/dockervolumes.md#data-volumes)
|
||||
(named volume) or [data
|
||||
If possible, avoid using shared drives for volume mounts on the host with
|
||||
network paths, and instead mount on the MobyVM, or create a [data
|
||||
volume](/engine/tutorials/dockervolumes.md#data-volumes) (named volume) or [data
|
||||
container](/engine/tutorials/dockervolumes.md#creating-and-mounting-a-data-volume-container).
|
||||
See also, the [volumes key under service
|
||||
configuration](/compose/compose-file/index.md#volumes) and the [volume
|
||||
|
@ -204,14 +219,14 @@ configuration
|
|||
reference](/compose/compose-file/index.md#volume-configuration-reference) in the
|
||||
Compose file documentation.
|
||||
|
||||
### Local security policies can block shared drives and cause login errors
|
||||
#### Local security policies can block shared drives and cause login errors
|
||||
|
||||
You need permissions to mount shared drives to use the Docker for
|
||||
Windows [shared drives](/docker-for-windows/index.md#shared-drives) feature.
|
||||
You need permissions to mount shared drives to use the Docker for Windows
|
||||
[shared drives](/docker-for-windows/index.md#shared-drives) feature.
|
||||
|
||||
If local policy prevents this, you get errors when you attempt to enable
|
||||
shared drives on Docker. This is not something Docker can resolve, since you do
|
||||
need these permissions to use the feature.
|
||||
If local policy prevents this, you get errors when you attempt to enable shared
|
||||
drives on Docker. This is not something Docker can resolve, since you do need
|
||||
these permissions to use the feature.
|
||||
|
||||
Here are snip-its from example error messages:
|
||||
|
||||
|
@ -226,11 +241,13 @@ mount: mounting //10.0.75.1/C on /c failed: Invalid argument
|
|||
|
||||
See also, <a href="https://github.com/docker/for-win/issues/98">Docker for Windows issue #98</a>.
|
||||
|
||||
### Understand symlinks limitations
|
||||
#### Understand symlinks limitations
|
||||
|
||||
Symlinks work within and across containers. However, symlinks created outside of containers (for example, on the host) do not work. To learn more, see [Are symlinks supported?](faqs.md#are-symlinks-supported) in the FAQs.
|
||||
Symlinks work within and across containers. However, symlinks created outside of
|
||||
containers (for example, on the host) do not work. To learn more, see [Are
|
||||
symlinks supported?](faqs.md#are-symlinks-supported) in the FAQs.
|
||||
|
||||
### Avoid unexpected syntax errors, use Unix style line endings for files in containers
|
||||
#### Avoid unexpected syntax errors, use Unix style line endings for files in containers
|
||||
|
||||
Any file destined to run inside a container must use Unix style `\n` line
|
||||
endings. This includes files referenced at the command line for builds and in
|
||||
|
@ -248,69 +265,13 @@ For an example of this issue and the resolution, see this issue on GitHub:
|
|||
[Docker RUN fails to execute shell
|
||||
script](https://github.com/moby/moby/issues/24388).
|
||||
|
||||
### Recreate or update your containers after Beta 18 upgrade
|
||||
### Virtualization
|
||||
|
||||
Docker 1.12.0 RC3 release introduces a backward incompatible change from RC2 to RC3. (For more information, see https://github.com/moby/moby/issues/24343#issuecomment-230623542.)
|
||||
|
||||
You may get the following error when you try to start a container created with pre-Beta 18 Docker for Windows applications.
|
||||
|
||||
Error response from daemon: Unknown runtime specified default
|
||||
|
||||
You can fix this by either [recreating](troubleshoot.md#recreate-your-containers) or [updating](troubleshoot.md#update-your-containers) your containers.
|
||||
|
||||
If you get the error message shown above, we recommend recreating them.
|
||||
|
||||
#### Recreate your containers
|
||||
|
||||
To recreate your containers, use Docker Compose.
|
||||
|
||||
docker-compose down && docker-compose up
|
||||
|
||||
#### Update your containers
|
||||
|
||||
To fix existing containers, follow these steps.
|
||||
|
||||
1. Run this command.
|
||||
|
||||
```powershell
|
||||
PS C:\Users\jdoe> docker run --rm -v /var/lib/docker:/docker cpuguy83/docker112rc3-runtimefix:rc3
|
||||
|
||||
Unable to find image 'cpuguy83/docker112rc3-runtimefix:rc3' locally
|
||||
rc3: Pulling from cpuguy83/docker112rc3-runtimefix
|
||||
91e7f9981d55: Pull complete
|
||||
Digest: sha256:96abed3f7a7a574774400ff20c6808aac37d37d787d1164d332675392675005c
|
||||
Status: Downloaded newer image for cpuguy83/docker112rc3-runtimefix:rc3
|
||||
proccessed 1648f773f92e8a4aad508a45088ca9137c3103457b48be1afb3fd8b4369e5140
|
||||
skipping container '433ba7ead89ba645efe9b5fff578e674aabba95d6dcb3910c9ad7f1a5c6b4538': already fixed
|
||||
proccessed 43df7f2ac8fc912046dfc48cf5d599018af8f60fee50eb7b09c1e10147758f06
|
||||
proccessed 65204cfa00b1b6679536c6ac72cdde1dbb43049af208973030b6d91356166958
|
||||
proccessed 66a72622e306450fd07f2b3a833355379884b7a6165b7527c10390c36536d82d
|
||||
proccessed 9d196e78390eeb44d3b354d24e25225d045f33f1666243466b3ed42fe670245c
|
||||
proccessed b9a0ecfe2ed9d561463251aa90fd1442299bcd9ea191a17055b01c6a00533b05
|
||||
proccessed c129a775c3fa3b6337e13b50aea84e4977c1774994be1f50ff13cbe60de9ac76
|
||||
proccessed dea73dc21126434f14c58b83140bf6470aa67e622daa85603a13bc48af7f8b04
|
||||
proccessed dfa8f9278642ab0f3e82ee8e4ad029587aafef9571ff50190e83757c03b4216c
|
||||
proccessed ee5bf706b6600a46e5d26327b13c3c1c5f7b261313438d47318702ff6ed8b30b
|
||||
```
|
||||
|
||||
2. Quit Docker.
|
||||
|
||||
3. Start Docker.
|
||||
|
||||
> **Note**: Be sure to quit and then restart Docker for Windows before attempting to start containers.
|
||||
|
||||
4. Try to start the container again:
|
||||
|
||||
```powershell
|
||||
PS C:\Users\jdoe> docker start old-container
|
||||
old-container
|
||||
```
|
||||
|
||||
### Hyper-V
|
||||
#### Hyper-V
|
||||
|
||||
Docker for Windows requires a Hyper-V as well as the Hyper-V Module for Windows
|
||||
Powershell to be installed and enabled. The Docker for Windows installer
|
||||
enables it for you.
|
||||
Powershell to be installed and enabled. The Docker for Windows installer enables
|
||||
it for you.
|
||||
|
||||
See [these
|
||||
instructions](https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/quick_start/walkthrough_install)
|
||||
|
@ -323,7 +284,7 @@ specific, but typically the BIOS option is called `Virtualization Technology
|
|||
Once Hyper-V is enabled, it shows up as such on "Turn Windows features on or
|
||||
off".
|
||||
|
||||

|
||||

|
||||
|
||||
#### Hyper-V driver for Docker Machine
|
||||
|
||||
|
@ -339,7 +300,7 @@ Hyper-V is enabled, an external network switch is active, and referenced in the
|
|||
flags for the `docker-machine create` command [as described in the Docker
|
||||
Machine driver example](/machine/drivers/hyper-v.md#example).
|
||||
|
||||
### Virtualization must be enabled
|
||||
#### Virtualization must be enabled
|
||||
|
||||
In addition to [Hyper-V](#hyper-v), virtualization must be enabled.
|
||||
|
||||
|
@ -351,8 +312,9 @@ Task Manager.
|
|||
|
||||

|
||||
|
||||
Also, see the user-reported issue
|
||||
[Unable to run Docker for Windows on Windows 10 Enterprise](https://github.com/docker/for-win/issues/74).
|
||||
Also, see the user-reported issue [Unable to run Docker for Windows on Windows
|
||||
10 Enterprise](https://github.com/docker/for-win/issues/74).
|
||||
|
||||
|
||||
### Networking and WiFi problems upon Docker for Windows install
|
||||
|
||||
|
@ -366,37 +328,37 @@ Hyper-V feature turns my wi-fi off
|
|||
|
||||
Here are some steps to take if you encounter similar problems:
|
||||
|
||||
1. Make sure virtualization is enabled, as described in the [Virtualization
|
||||
troubleshooting topic](#virtualization-must-be-enabled).
|
||||
1. Make sure virtualization is enabled, as described in the [Virtualization
|
||||
troubleshooting topic](#virtualization-must-be-enabled).
|
||||
|
||||
2. Make sure the Hyper-V is installed and enabled, as described in the previous
|
||||
[Hyper-V troubleshooting topic](#hyper-v).
|
||||
2. Make sure the Hyper-V is installed and enabled, as described in the previous
|
||||
[Hyper-V troubleshooting topic](#hyper-v).
|
||||
|
||||
3. Check your network switches to see if `DockerNAT` is enabled.
|
||||
3. Check your network switches to see if `DockerNAT` is enabled.
|
||||
|
||||
Open the **Hyper-V Manager**. (On Windows 10, just search for the
|
||||
Hyper-V Manager in the search field in the lower left search field.)
|
||||
Open the **Hyper-V Manager**. (On Windows 10, just search for the Hyper-V
|
||||
Manager in the search field in the lower left search field.)
|
||||
|
||||
Select the Virtual Switch Manager on the left-side **Actions** panel.
|
||||
Select the Virtual Switch Manager on the left-side **Actions** panel.
|
||||
|
||||

|
||||

|
||||
|
||||
4. Set up an external network switch. If you plan at any point to use [Docker
|
||||
Machine](/machine/overview.md) to set up multiple local VMs, you need this
|
||||
anyway, as described in the topic on the [Hyper-V driver for [Docker
|
||||
Machine](/machine/drivers/hyper-v.md#example). You can replace `DockerNAT` with
|
||||
this switch.
|
||||
4. Set up an external network switch. If you plan at any point to use [Docker
|
||||
Machine](/machine/overview.md) to set up multiple local VMs, you need this
|
||||
anyway, as described in the topic on the [Hyper-V driver for [Docker
|
||||
Machine](/machine/drivers/hyper-v.md#example). You can replace `DockerNAT`
|
||||
with this switch.
|
||||
|
||||
5. If previous steps fail to solve the problems, follow steps on the
|
||||
[Cleanup README](https://github.com/Microsoft/Virtualization-Documentation/blob/master/windows-server-container-tools/CleanupContainerHostNetworking/README.md).
|
||||
5. If previous steps fail to solve the problems, follow steps on the [Cleanup
|
||||
README](https://github.com/Microsoft/Virtualization-Documentation/blob/master/windows-server-container-tools/CleanupContainerHostNetworking/README.md).
|
||||
|
||||
>Read full description of consequences before you run Windows cleanup script
|
||||
>
|
||||
>The cleanup command has a `-Cleanup` flag and a
|
||||
`-ForceDeleteAllSwitches` flag. Be sure to read the whole page
|
||||
before running any scripts, especially the warnings with regard
|
||||
to the `-ForceDeleteAllSwitches` option.
|
||||
{: .warning}
|
||||
> Read full description of consequences before you run Windows cleanup
|
||||
> script
|
||||
>
|
||||
> The cleanup command has a `-Cleanup` flag and a `-ForceDeleteAllSwitches`
|
||||
> flag. Be sure to read the whole page before running any scripts,
|
||||
> especially the warnings with regard to the `-ForceDeleteAllSwitches`
|
||||
> option. {: .warning}
|
||||
|
||||
### Windows containers and Windows Server 2016
|
||||
|
||||
|
@ -413,11 +375,11 @@ Windows containers without Docker for Windows. However, if you install Docker
|
|||
this way, you cannot develop or run Linux containers. If you try to run a Linux
|
||||
container on the native Docker daemon, an error occurs:
|
||||
|
||||
```none
|
||||
C:\Program Files\Docker\docker.exe:
|
||||
image operating system "linux" cannot be used on this platform.
|
||||
See 'C:\Program Files\Docker\docker.exe run --help'.
|
||||
```
|
||||
```none
|
||||
C:\Program Files\Docker\docker.exe:
|
||||
image operating system "linux" cannot be used on this platform.
|
||||
See 'C:\Program Files\Docker\docker.exe run --help'.
|
||||
```
|
||||
|
||||
### Limitations of Windows containers for `localhost` and published ports
|
||||
|
||||
|
@ -445,10 +407,11 @@ Linux containers).
|
|||
To reach a Windows container from the local host, you need to specify
|
||||
the IP address and port for the container that is running the service.
|
||||
|
||||
You can get the container IP address by using [`docker inspect`](/engine/reference/commandline/inspect.md) with some
|
||||
`--format` options and the ID or name of the container. For the example above,
|
||||
the command would look like this, using the name we gave to the container
|
||||
(`webserver`) instead of the container ID:
|
||||
You can get the container IP address by using [`docker
|
||||
inspect`](/engine/reference/commandline/inspect.md) with some `--format` options
|
||||
and the ID or name of the container. For the example above, the command would
|
||||
look like this, using the name we gave to the container (`webserver`) instead of
|
||||
the container ID:
|
||||
|
||||
{% raw %}
|
||||
```bash
|
||||
|
@ -475,11 +438,14 @@ Now you can connect to the webserver by using `http://172.17.0.2:80` (or simply
|
|||
|
||||
For more information, see:
|
||||
|
||||
* Docker for Windows issue on GitHub: [Port binding does not work for locahost](https://github.com/docker/for-win/issues/458)
|
||||
* Docker for Windows issue on GitHub: [Port binding does not work for
|
||||
locahost](https://github.com/docker/for-win/issues/458)
|
||||
|
||||
* [Published Ports on Windows Containers Don't Do Loopback](https://blog.sixeyed.com/published-ports-on-windows-containers-dont-do-loopback/)
|
||||
* [Published Ports on Windows Containers Don't Do
|
||||
Loopback](https://blog.sixeyed.com/published-ports-on-windows-containers-dont-do-loopback/)
|
||||
|
||||
* [Windows NAT capabilities and limitations](https://blogs.technet.microsoft.com/virtualization/2016/05/25/windows-nat-winnat-capabilities-and-limitations/)
|
||||
* [Windows NAT capabilities and
|
||||
limitations](https://blogs.technet.microsoft.com/virtualization/2016/05/25/windows-nat-winnat-capabilities-and-limitations/)
|
||||
|
||||
|
||||
### Running Docker for Windows in nested virtualization scenarios
|
||||
|
@ -488,63 +454,73 @@ Docker for Windows can run inside a Windows 10 virtual machine (VM) running on
|
|||
apps like Parallels or VMware Fusion on a Mac provided that the VM is properly
|
||||
configured. However, problems and intermittent failures may still occur due to
|
||||
the way these apps virtualize the hardware. For these reasons, _**Docker for
|
||||
Windows is not supported for nested virtualization scenarios**_. It
|
||||
might work in some cases, and not in others.
|
||||
Windows is not supported for nested virtualization scenarios**_. It might work
|
||||
in some cases, and not in others.
|
||||
|
||||
The better solution is to run Docker for Windows natively on a Windows system
|
||||
(to work with Windows or Linux containers), or Docker for Mac on Mac
|
||||
to work with Linux containers.
|
||||
(to work with Windows or Linux containers), or Docker for Mac on Mac to work
|
||||
with Linux containers.
|
||||
|
||||
#### If you still want to use nested virtualization
|
||||
|
||||
* Make sure nested virtualization support is enabled in VMWare or Parallels.
|
||||
Check the settings in
|
||||
**Hardware -> CPU & Memory -> Advanced Options -> Enable nested virtualization**
|
||||
(the exact menu sequence might vary slightly).
|
||||
Check the settings in **Hardware -> CPU & Memory -> Advanced Options -> Enable
|
||||
nested virtualization** (the exact menu sequence might vary slightly).
|
||||
|
||||
* Configure your VM with at least 2 CPUs and sufficient memory to run your
|
||||
workloads.
|
||||
workloads.
|
||||
|
||||
* Make sure your system is more or less idle.
|
||||
|
||||
* Make sure your Windows OS is up-to-date. There have been several issues with some insider builds.
|
||||
* Make sure your Windows OS is up-to-date. There have been several issues with
|
||||
some insider builds.
|
||||
|
||||
* The processor you have may also be relevant. For example, Westmere based
|
||||
Mac Pros have some additional hardware virtualization features over
|
||||
Nehalem based Mac Pros and so do newer generations of Intel processors.
|
||||
* The processor you have may also be relevant. For example, Westmere based Mac
|
||||
Pros have some additional hardware virtualization features over Nehalem based
|
||||
Mac Pros and so do newer generations of Intel processors.
|
||||
|
||||
#### Typical failures we see with nested virtualization
|
||||
|
||||
* Slow boot time of the Linux VM. If you look in the logs and find
|
||||
some entries prefixed with `Moby`. On real hardware, it takes 5-10 seconds to
|
||||
boot the Linux VM; roughly the time between the `Connected` log entry and the `*
|
||||
Starting Docker ... [ ok ]` log entry. If you boot the Linux VM inside a Windows
|
||||
VM, this may take considerably longer. We have a timeout of 60s or so. If the VM
|
||||
hasn't started by that time, we retry. If the retry fails we print an error. You
|
||||
can sometimes work around this by providing more resources to the Windows VM.
|
||||
* Slow boot time of the Linux VM. If you look in the logs and find some entries
|
||||
prefixed with `Moby`. On real hardware, it takes 5-10 seconds to boot the
|
||||
Linux VM; roughly the time between the `Connected` log entry and the `*
|
||||
Starting Docker ... [ ok ]` log entry. If you boot the Linux VM inside a
|
||||
Windows VM, this may take considerably longer. We have a timeout of 60s or
|
||||
so. If the VM hasn't started by that time, we retry. If the retry fails we
|
||||
print an error. You can sometimes work around this by providing more resources
|
||||
to the Windows VM.
|
||||
|
||||
* Sometimes the VM fails to boot when Linux tries to calibrate the
|
||||
time stamp counter (TSC). This process is quite timing sensitive and may fail
|
||||
when executed inside a VM which itself runs inside a VM. CPU utilization is also
|
||||
likely to be higher.
|
||||
* Sometimes the VM fails to boot when Linux tries to calibrate the time stamp
|
||||
counter (TSC). This process is quite timing sensitive and may fail when
|
||||
executed inside a VM which itself runs inside a VM. CPU utilization is also
|
||||
likely to be higher.
|
||||
|
||||
#### Related issues
|
||||
|
||||
Discussion thread on GitHub at [Docker for Windows issue 267](https://github.com/docker/for-win/issues/267)
|
||||
Discussion thread on GitHub at [Docker for Windows issue
|
||||
267](https://github.com/docker/for-win/issues/267)
|
||||
|
||||
### Networking issues
|
||||
|
||||
Some users have reported problems connecting to Docker Hub on the Docker for Windows stable version. (See GitHub issue [22567](https://github.com/moby/moby/issues/22567).)
|
||||
Some users have reported problems connecting to Docker Hub on the Docker for
|
||||
Windows stable version. (See GitHub issue
|
||||
[22567](https://github.com/moby/moby/issues/22567).)
|
||||
|
||||
Here is an example command and error message:
|
||||
|
||||
PS C:\Users\jdoe> docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
Pulling repository docker.io/library/hello-world
|
||||
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error while pulling image: Get https://index.docker.io/v1/repositories/library/hello-world/images: dial tcp: lookup index.docker.io on 10.0.75.1:53: no such host.
|
||||
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
|
||||
```
|
||||
PS C:\Users\jdoe> docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
Pulling repository docker.io/library/hello-world
|
||||
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error while pulling image: Get https://index.docker.io/v1/repositories/library/hello-world/images: dial tcp: lookup index.docker.io on 10.0.75.1:53: no such host.
|
||||
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
|
||||
```
|
||||
|
||||
As an immediate workaround to this problem, reset the DNS server to use the Google DNS fixed address: `8.8.8.8`. You can configure this via the **Settings** -> **Network** dialog, as described in the topic [Network](/docker-for-windows/index.md#network). Docker automatically restarts when you apply this setting, which could take some time.
|
||||
As an immediate workaround to this problem, reset the DNS server to use the
|
||||
Google DNS fixed address: `8.8.8.8`. You can configure this via the **Settings**
|
||||
-> **Network** dialog, as described in the topic
|
||||
[Network](/docker-for-windows/index.md#network). Docker automatically restarts
|
||||
when you apply this setting, which could take some time.
|
||||
|
||||
We are currently investigating this issue.
|
||||
|
||||
|
@ -571,15 +547,17 @@ remove them.
|
|||
|
||||
##### 3. Remove stale NAT configurations
|
||||
|
||||
You might have stale NAT configurations on the system. You should remove them with `Remove-NetNat DockerNAT` on an elevated Powershell prompt.
|
||||
You might have stale NAT configurations on the system. You should remove them
|
||||
with `Remove-NetNat DockerNAT` on an elevated Powershell prompt.
|
||||
|
||||
##### 4. Remove stale network adapters
|
||||
|
||||
You might have stale Network Adapters on the system. You should remove them with the following commands on an elevated Powershell prompt:
|
||||
You might have stale Network Adapters on the system. You should remove them with
|
||||
the following commands on an elevated Powershell prompt:
|
||||
|
||||
```
|
||||
PS C:\Users\jdoe> $vmNetAdapter = Get-VMNetworkAdapter -ManagementOS -SwitchName DockerNAT
|
||||
Get-NetAdapter "vEthernet (DockerNAT)" | ? { $_.DeviceID -ne $vmNetAdapter.DeviceID } | Disable-NetAdapter -Confirm:$False -PassThru | Rename-NetAdapter -NewName "Broken Docker Adapter"
|
||||
PS C:\Users\jdoe> $vmNetAdapter = Get-VMNetworkAdapter -ManagementOS -SwitchName DockerNAT
|
||||
Get-NetAdapter "vEthernet (DockerNAT)" | ? { $_.DeviceID -ne $vmNetAdapter.DeviceID } | Disable-NetAdapter -Confirm:$False -PassThru | Rename-NetAdapter -NewName "Broken Docker Adapter"
|
||||
```
|
||||
|
||||
Then you can remove them manually via the `devmgmt.msc` (aka Device Manager).
|
||||
|
@ -618,13 +596,17 @@ To create a larger NAT prefix, do the following.
|
|||
|
||||
1. Stop Docker for Windows and remove all NAT prefixes with `Remove-NetNAT`.
|
||||
|
||||
2. Create a new shorter NAT prefix which covers the Docker for Windows NAT prefix but allows room for additional NAT prefixes. For example:
|
||||
2. Create a new shorter NAT prefix which covers the Docker for Windows NAT
|
||||
prefix but allows room for additional NAT prefixes. For example:
|
||||
|
||||
New-NetNat -Name DockerNAT -InternalIPInterfaceAddressPrefix 10.0.0.0/16
|
||||
```
|
||||
New-NetNat -Name DockerNAT -InternalIPInterfaceAddressPrefix 10.0.0.0/16
|
||||
```
|
||||
|
||||
The next time Docker for Windows starts, it uses the new, wider prefix.
|
||||
The next time Docker for Windows starts, it uses the new, wider prefix.
|
||||
|
||||
Alternatively, you can use a different NAT name and NAT prefix and adjust the NAT prefix Docker for Windows uses accordingly via the `Settings` panel.
|
||||
Alternatively, you can use a different NAT name and NAT prefix and adjust the
|
||||
NAT prefix Docker for Windows uses accordingly via the `Settings` panel.
|
||||
|
||||
>**Note**: You also need to adjust your existing VMs to use IP addresses from within the new NAT prefix.
|
||||
|
||||
|
@ -632,26 +614,36 @@ Alternatively, you can use a different NAT name and NAT prefix and adjust the NA
|
|||
|
||||
### `inotify` currently does not work on Docker for Windows
|
||||
|
||||
If you are using `Node.js` with `nodemon`, a temporary workaround is to try the fallback polling mode described here: [nodemon isn't restarting node applications](https://github.com/remy/nodemon#application-isnt-restarting). See also this issue on GitHub [Inotify on shared drives does not work](https://github.com/docker/for-win/issues/56#issuecomment-242135705).
|
||||
If you are using `Node.js` with `nodemon`, a temporary workaround is to try the
|
||||
fallback polling mode described here: [nodemon isn't restarting node
|
||||
applications](https://github.com/remy/nodemon#application-isnt-restarting). See
|
||||
also this issue on GitHub [Inotify on shared drives does not
|
||||
work](https://github.com/docker/for-win/issues/56#issuecomment-242135705).
|
||||
|
||||
### Reboot
|
||||
|
||||
Restart your PC to stop / discard any vestige of the daemon running from the previously installed version.
|
||||
Restart your PC to stop / discard any vestige of the daemon running from the
|
||||
previously installed version.
|
||||
|
||||
### Unset `DOCKER_HOST`
|
||||
|
||||
The `DOCKER_HOST` environmental variable does not need to be set.
|
||||
If you use bash, use the command `unset ${!DOCKER_*}` to unset it.
|
||||
For other shells, consult the shell's documentation.
|
||||
The `DOCKER_HOST` environmental variable does not need to be set. If you use
|
||||
bash, use the command `unset ${!DOCKER_*}` to unset it. For other shells,
|
||||
consult the shell's documentation.
|
||||
|
||||
### Make sure Docker is running for webserver examples
|
||||
|
||||
For the `hello-world-nginx` example and others, Docker for Windows must be running to get to the webserver on `http://localhost/`. Make sure that the Docker whale is showing in the menu bar, and that you run the Docker commands in a shell that is connected to the Docker for Windows Engine (not Engine from Toolbox). Otherwise, you might start the webserver container but get a "web page not available" error when you go to `docker`.
|
||||
For the `hello-world-nginx` example and others, Docker for Windows must be
|
||||
running to get to the webserver on `http://localhost/`. Make sure that the
|
||||
Docker whale is showing in the menu bar, and that you run the Docker commands in
|
||||
a shell that is connected to the Docker for Windows Engine (not Engine from
|
||||
Toolbox). Otherwise, you might start the webserver container but get a "web page
|
||||
not available" error when you go to `docker`.
|
||||
|
||||
### How to solve `port already allocated` errors
|
||||
|
||||
If you see errors like `Bind for 0.0.0.0:8080 failed: port is already allocated` or
|
||||
`listen tcp:0.0.0.0:8080: bind: address is already in use` ...
|
||||
If you see errors like `Bind for 0.0.0.0:8080 failed: port is already allocated`
|
||||
or `listen tcp:0.0.0.0:8080: bind: address is already in use` ...
|
||||
|
||||
These errors are often caused by some other software on Windows using those
|
||||
ports. To discover the identity of this software, either use the `resmon.exe`
|
||||
|
@ -666,10 +658,10 @@ docker app.
|
|||
**Some firewalls and anti-virus software might be incompatible with Microsoft
|
||||
**Windows 10 builds**, such as Windows 10 Anniversary Update. The conflict
|
||||
typically occurs after a Windows update or new install of the firewall, and
|
||||
manifests as an error response from the Docker daemon and a **Docker for
|
||||
Windows start failure**. The Comodo Firewall was one example of this problem,
|
||||
but users report that software has since been updated to work with these
|
||||
Windows 10 builds.
|
||||
manifests as an error response from the Docker daemon and a **Docker for Windows
|
||||
start failure**. The Comodo Firewall was one example of this problem, but users
|
||||
report that software has since been updated to work with these Windows 10
|
||||
builds.
|
||||
|
||||
See the Comodo forums topics [Comodo Firewall conflict with
|
||||
Hyper-V](https://forums.comodo.com/bug-reports-cis/comodo-firewall-began-conflict-with-hyperv-t116351.0.html)
|
||||
|
@ -679,5 +671,5 @@ A Docker for Windows user-created issue describes the problem specifically as it
|
|||
relates to Docker: [Docker fails to start on Windows
|
||||
10](https://github.com/docker/for-win/issues/27).
|
||||
|
||||
For a temporary workaround, uninstall the firewall or anti-virus software, or explore other
|
||||
workarounds suggested on the forum.
|
||||
For a temporary workaround, uninstall the firewall or anti-virus software, or
|
||||
explore other workarounds suggested on the forum.
|
||||
|
|