Desktop: networking (#6258)

This commit is contained in:
Akim Demaille 2018-03-23 13:46:43 +01:00 committed by Gwendolynne Barr
parent 10e987db99
commit b419d141e1
26 changed files with 500 additions and 418 deletions

View File

@ -2964,6 +2964,8 @@ manuals:
title: Install Docker for Windows
- path: /docker-for-windows/kubernetes/
title: Deploy on Kubernetes
- path: /docker-for-windows/networking/
title: Networking
- path: /docker-for-windows/docker-toolbox/
title: Migrate Docker Toolbox
- path: /docker-for-windows/troubleshoot/

View File

@ -591,7 +591,7 @@ TCP connection is idle for more than 5 minutes (related to
**New**
- More options when moving disk image (see [Storage location](/docker-for-mac/index.md#storage-location) under Advanced preference settings)
- More options when moving disk image (see [Storage location](index.md#storage-location) under Advanced preference settings)
- Filesharing and daemon table empty fields are editable
- DNS forwarder ignores responses from malfunctioning servers ([docker/for-mac#1025](https://github.com/docker/for-mac/issues/1025))
- DNS forwarder send all queries in parallel, process results in order
@ -776,9 +776,9 @@ TCP connection is idle for more than 5 minutes (related to
**New**
- Dedicated preference pane for advanced configuration of the docker daemon (edit daemon.json). See [[Daemon Advanced (JSON configuration file)](/docker-for-mac/index.md#daemon-advanced-json-configuration-file).
- Dedicated preference pane for advanced configuration of the docker daemon (edit daemon.json). See [Daemon Advanced (JSON configuration file)](index.md#daemon-advanced-json-configuration-file).
- Docker Experimental mode can be toggled. See [Daemon Basic (experimental mode and registries)](/docker-for-mac/index.md#daemon-basic-experimental-mode-and-registries).
- Docker Experimental mode can be toggled. See [Daemon Basic (experimental mode and registries)](index.md#daemon-basic-experimental-mode-and-registries).
**Upgrades**
@ -1072,7 +1072,7 @@ events or unexpected unmounts.
**New**
* Docker for Mac is now available from 2 channels: **stable** and **beta**. New features and bug fixes will go out first in auto-updates to users in the beta channel. Updates to the stable channel are much less frequent and happen in sync with major and minor releases of the Docker engine. Only features that are well-tested and ready for production are added to the stable channel releases. For downloads of both and more information, see the [Getting Started](/docker-for-mac/index.md#download-docker-for-mac).
* Docker for Mac is now available from 2 channels: **stable** and **beta**. New features and bug fixes will go out first in auto-updates to users in the beta channel. Updates to the stable channel are much less frequent and happen in sync with major and minor releases of the Docker engine. Only features that are well-tested and ready for production are added to the stable channel releases. For downloads of both and more information, see the [Getting Started](index.md#download-docker-for-mac).
**Upgrades**

View File

@ -130,7 +130,7 @@ in [Docker Swarm](/engine/swarm/index.md). A good place to start is the
### What if I have problems or questions?
You can find the list of frequent issues in
[Logs and Troubleshooting](/docker-for-mac/troubleshoot.md).
[Logs and Troubleshooting](troubleshoot.md).
If you do not find a solution in Troubleshooting, browse issues on
[Docker for Mac issues on GitHub](https://github.com/docker/for-mac/issues) or
@ -211,7 +211,7 @@ Starting with Docker for Mac Beta 27 and Stable 1.12.3, all trusted certificate
authorities (CAs) (root or intermediate) are supported.
For full information on adding server and client side certs, see [Adding
TLS certificates](/docker-for-mac/index.md#adding-tls-certificates) in
TLS certificates](index.md#adding-tls-certificates) in
the Getting Started topic.
### How do I add client certificates?
@ -222,7 +222,7 @@ in `~/.docker/certs.d/<MyRegistry>:<Port>/client.cert` and
`~/.docker/certs.d/<MyRegistry>:<Port>/client.key`.
For full information on adding server and client side certs, see [Adding
TLS certificates](/docker-for-mac/index.md#adding-tls-certificates) in
TLS certificates](index.md#adding-tls-certificates) in
the Getting Started topic.
### Can I pass through a USB device to a container?

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

View File

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

View File

@ -90,13 +90,13 @@ docker-machine version {{ site.machine_version }}, build 9ba6da9
## Preferences menu
Choose ![whale menu](/docker-for-mac/images/whale-x.png){: .inline} -> **Preferences** from the menu bar and configure the runtime options described below.
Choose ![whale menu](images/whale-x.png){: .inline} -> **Preferences** from the menu bar and configure the runtime options described below.
![Docker context menu](images/menu/d4m-menu-prefs.png){:width="250px"}
### General tab
### General
![Preferences](/docker-for-mac/images/menu/d4m-menu-prefs-general.png){:width="400px"}
![Preferences](images/menu/d4m-menu-prefs-general.png){:width="400px"}
Gneral settings are:
@ -105,7 +105,7 @@ Gneral settings are:
- **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 ![whale menu](/docker-for-mac/images/whale-x.png){: .inline} -> **Check for Updates**.
manually by choosing ![whale menu](images/whale-x.png){: .inline} -> **Check for Updates**.
- **Include VM in Time Machine backups** backs up the Docker for Mac virtual machine. (Disabled by default.)
@ -113,7 +113,7 @@ Gneral settings are:
- **Send usage statistics** &mdash; 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.)
### File sharing tab
### File sharing
Choose which local directories to share with your containers. File sharing is
required for volume mounting if the project lives outside of the `/Users`
@ -139,7 +139,7 @@ For more information, see:
- [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).)
### Advanced tab
### Advanced
On the Advanced tab, you can limit resources available to Docker.
@ -157,7 +157,7 @@ to decrease it, lower the number.
**Swap**: Configure swap file size as needed. The default is 1 GB.
### Disk tab
### Disk
Specify the **Disk image location** of the Linux volume, where containers and images are stored.
@ -165,27 +165,49 @@ 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.
![Proxies settings](/docker-for-mac/images/menu/d4m-menu-prefs-disk.png){:width="400px"}
![Disk settings](images/menu/d4m-menu-prefs-disk.png){:width="400px"}
### Proxies tab
### Proxies
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.
Docker for Mac detects HTTP/HTTPS Proxy Settings from macOS and automatically
propagates 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.
![Proxies settings](/docker-for-mac/images/menu/d4m-menu-prefs-proxies.png){:width="400px"}
![Proxies settings](images/menu/d4m-menu-prefs-proxies.png){:width="400px"}
![macOS Proxy Settings](images/proxy-settings.png){:width="600px"}
When you start a container, your proxy settings propagate into
the containers. For example:
```
$ docker run -it alpine env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=b7edf988b2b5
TERM=xterm
HOME=/root
HTTP_PROXY=http://proxy.example.com:3128
http_proxy=http://proxy.example.com:3128
no_proxy=*.local, 169.254/16
```
You can see from the above output that the `HTTP_PROXY`, `http_proxy`, and
`no_proxy` environment variables are set. When your proxy configuration changes,
Docker restarts automatically to pick up the new settings. If you have
containers that you wish to keep running across restarts, you should consider
using [restart policies](/engine/reference/run/#restart-policies-restart).
<p id="daemon-experimental-mode" />
### Daemon tab
### Daemon
You can configure options on the Docker daemon that determine how your containers run.
Select **Basic** to configure the daemon with interactive settings, or select
**Advanced** to edit the JSON directly.
![Daemon](/docker-for-mac/images/menu/d4m-menu-prefs-daemon-basic.png){:width="400px"}
![Daemon](images/menu/d4m-menu-prefs-daemon-basic.png){:width="400px"}
#### Experimental features
@ -215,8 +237,8 @@ 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){:target="_blank" class="_"}
- [How do I add client certificates](/docker-for-mac/faqs.md#how-do-i-client-certificates){:target="_blank" class="_"}
- [How do I add custom CA certificates?](faqs.md#how-do-i-add-custom-ca-certificates){:target="_blank" class="_"}
- [How do I add client certificates](faqs.md#how-do-i-client-certificates){:target="_blank" class="_"}
#### Daemon configuration file
@ -226,14 +248,14 @@ list of options, see the Docker Engine [dockerd commandline reference](/engine/r
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.
![Docker Daemon](/docker-for-mac/images/menu/d4m-menu-prefs-daemon-adv.png){:width="400px"}
![Docker Daemon](images/menu/d4m-menu-prefs-daemon-adv.png){:width="400px"}
### Kubernetes tab
### Kubernetes
**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="_"}.
[General configuration](#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
@ -256,7 +278,7 @@ experience conflicts, remove `/usr/local/bin/kubectl`.
running as a Docker container, select **Enable Kubernetes** and click the
**Apply** button.
![Enable Kubernetes](/docker-for-mac/images/menu/d4m-menu-prefs-kubernetes.png){: .with-border width="400px"}
![Enable Kubernetes](images/menu/d4m-menu-prefs-kubernetes.png){: .with-border width="400px"}
An Internet connection is required. Images required to run the Kubernetes
@ -266,11 +288,11 @@ experience conflicts, remove `/usr/local/bin/kubectl`.
When Kubernetes is enabled and running, an additional status bar item displays
at the bottom right of the Docker for Mac Preferences dialog.
![Installation complete](/docker-for-mac/images/kubernetes/kubernetes-install-complete.png){:width="400px"}
![Installation complete](images/kubernetes/kubernetes-install-complete.png){:width="400px"}
The status of Kubernetes shows in the Docker menu and the context points to `docker-for-desktop`.
![Docker Menu with Kubernetes](/docker-for-mac/images/menu/d4m-menu-kube-context.png){: .with-border width="400px"}
![Docker Menu with Kubernetes](images/menu/d4m-menu-kube-context.png){: .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
@ -282,11 +304,11 @@ 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){:target="_blank" class="_"}.
Docker for Mac, see [Deploy to Kubernetes](kubernetes.md){:target="_blank" class="_"}.
### Reset tab
### Reset
Select ![whale menu](/docker-for-mac/images/whale-x.png){: .inline} ->
Select ![whale menu](images/whale-x.png){: .inline} ->
**Preferences** from the menu bar, then click **Reset** to reset factory
defaults, restart the Docker daemon, or uninstall.
@ -371,7 +393,7 @@ for Mac `xhyve` virtual machine).
> effect.
>
> * The registry cannot be listed as an _insecure registry_ (see [Docker
> Daemon](/docker-for-mac/index.md#docker-daemon)). Docker for Mac ignores
> Daemon](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
@ -455,13 +477,13 @@ ln -s $etc/docker-compose.zsh-completion /usr/local/share/zsh/site-functions/_do
## 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){:target="_blank" class="_"}.
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){: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.
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 [Logs
and Troubleshooting](troubleshoot.md) for more details.
To give us feedback on the documentation or update it yourself, use the Feedback
options at the bottom of each docs page.

View File

@ -26,7 +26,7 @@ Both Stable and Edge installers come with <a
href="https://github.com/docker/docker-ce/blob/master/components/cli/experimental/README.md">
experimental features in Docker Engine</a> enabled by default and configurable
on [Docker Daemon
preferences](/docker-for-mac/index.md#daemon-experimental-mode) for experimental
preferences](index.md#daemon-experimental-mode) for experimental
mode. We recommend that you disable experimental features for apps in
production.
@ -35,7 +35,7 @@ href="troubleshoot/#diagnose-problems-send-feedback-and-create-github-issues">fe
to help us as the apps evolve.
For more about Stable and Edge channels, see the
[FAQs](/docker-for-mac/faqs.md#stable-and-edge-channels).
[FAQs](faqs.md#stable-and-edge-channels).
<table style="width:100%">
<tr>
@ -136,27 +136,27 @@ for Docker for Mac, and how the two products can coexist.
1. Double-click `Docker.dmg` to open the installer, then drag Moby the whale to
the Applications folder.
![Install Docker app](/docker-for-mac/images/docker-app-drag.png)
![Install Docker app](images/docker-app-drag.png)
2. Double-click `Docker.app` in the Applications folder to start Docker. (In the example below, the Applications folder is in "grid" view mode.)
![Docker app in Hockeyapp](/docker-for-mac/images/docker-app-in-apps.png)
![Docker app in Hockeyapp](images/docker-app-in-apps.png)
You are prompted to authorize `Docker.app` with your system password after you launch it.
Privileged access is needed to install networking components and links to the Docker apps.
The whale in the top status bar indicates that Docker is running, and accessible from a terminal.
![Whale in menu bar](/docker-for-mac/images/whale-in-menu-bar.png)
![Whale in menu bar](images/whale-in-menu-bar.png)
If you just installed the app, you also get a success message with suggested
next steps and a link to this documentation. Click the whale (![whale
menu](/docker-for-mac/images/whale-x.png){: .inline}) in the status bar to
menu](images/whale-x.png){: .inline}) in the status bar to
dismiss this popup.
![Startup information](/docker-for-mac/images/mac-install-success-docker-cloud.png)
![Startup information](images/mac-install-success-docker-cloud.png)
3. Click the whale (![whale menu](/docker-for-mac/images/whale-x.png){: .inline}) to get Preferences and other options.
3. Click the whale (![whale menu](images/whale-x.png){: .inline}) to get Preferences and other options.
![Docker context menu](images/menu/menu.png)

View File

@ -5,74 +5,58 @@ redirect_from:
- /mackit/networking/
title: Networking features in Docker for Mac
---
{% assign Arch = 'Mac' %}
Docker for Mac provides several networking features to make it easier to use.
Docker for {{Arch}} provides several networking features to make it
easier to use.
## Features
### VPN Passthrough
Docker for Mac's networking can work when attached to a VPN. To do this, Docker
for Mac intercepts traffic from the `HyperKit` and injects it into macOS as if
it originated from the Docker application.
Docker for {{Arch}}'s networking can work when attached to a VPN. To do this,
Docker for {{Arch}} intercepts traffic from the containers and injects it into
{{Arch}} as if it originated from the Docker application.
### Port Mapping
When you run a container with the `-p` argument, for example:
```
$ docker run -p 80:80 -d nginx
```
Docker for Mac makes whatever is running on port 80 in the container (in this case, `nginx`) available on port 80 of `localhost`. In this example, the host and container ports are the same. What if you need to specify a different host port? If, for example, you already have something running on port 80 of your host machine, you can connect the container to a different port:
Docker for {{Arch}} makes whatever is running on port 80 in the container (in
this case, `nginx`) available on port 80 of `localhost`. In this example, the
host and container ports are the same. What if you need to specify a different
host port? If, for example, you already have something running on port 80 of
your host machine, you can connect the container to a different port:
```
$ docker run -p 8081:80 -d nginx
$ docker run -p 8000:80 -d nginx
```
Now, connections to `localhost:8081` are sent to port 80 in the container. The syntax for `-p` is `HOST_PORT:CLIENT_PORT`.
Now, connections to `localhost:8000` are sent to port 80 in the container. The
syntax for `-p` is `HOST_PORT:CLIENT_PORT`.
### HTTP/HTTPS Proxy Support
Docker for Mac detects HTTP/HTTPS Proxy Settings from macOS and
automatically propagate these to Docker and to your containers. For example, if
you set your proxy settings to `http://proxy.example.com` in macOS, Docker
uses this proxy when pulling containers.
![macOS Proxy Settings](images/proxy-settings.png)
When you start a container, your proxy settings propagate into
the containers. For example:
```
$ docker run -it alpine env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=b7edf988b2b5
TERM=xterm
HOME=/root
HTTP_PROXY=http://proxy.example.com:3128
http_proxy=http://proxy.example.com:3128
no_proxy=*.local, 169.254/16
```
You can see from the above output that the `HTTP_PROXY`, `http_proxy`, and
`no_proxy` environment variables are set. When your proxy configuration changes,
Docker restarts automatically to pick up the new settings. If you have
containers that you wish to keep running across restarts, you should consider
using [restart policies](/engine/reference/run/#restart-policies-restart).
See [Proxies](index.md:Proxies).
## Known limitations, use cases, and workarounds
Following is a summary of current limitations on the Docker for Mac networking
stack, along with some ideas for workarounds.
Following is a summary of current limitations on the Docker for {{Arch}}
networking stack, along with some ideas for workarounds.
### There is no docker0 bridge on macOS
Because of the way networking is implemented in Docker for Mac, you cannot see a
`docker0` interface in macOS. This interface is actually within `HyperKit`.
`docker0` interface on the host. This interface is actually within the virtual
machine.
### I cannot ping my containers
Docker for Mac can't traffic to containers, and from containers
back to the host.
Docker for Mac can't route traffic to containers.
### Per-container IP addressing is not possible
@ -84,22 +68,25 @@ There are two scenarios that the above limitations affect:
#### I want to connect from a container to a service on the host
The Mac has a changing IP address (or none if you have no network access). From
17.12 onwards our recommendation is to connect to the special Mac-only DNS
name `docker.for.mac.host.internal`, which resolves to the internal IP address
used by the host.
The host has a changing IP address (or none if you have no network access). From
18.03 onwards our recommendation is to connect to the special DNS name
`host.docker.internal`, which resolves to the internal IP address used by the
host.
The gateway is also reachable as `gateway.docker.internal`.
#### I want to connect to a container from the Mac
Port forwarding works for `localhost`; `--publish`, `-p`, or `-P` all work.
Ports exposed from Linux are forwarded to the Mac.
Ports exposed from Linux are forwarded to the host.
Our current recommendation is to publish a port, or to connect from another
container. This is what you need to do even on Linux if the container
is on an overlay network, not a bridge network, as these are not routed.
container. This is what you need to do even on Linux if the container is on an
overlay network, not a bridge network, as these are not routed.
The command to run the `nginx` webserver shown in [Getting
Started](/docker-for-mac/index.md#explore-the-application-and-run-examples) is an example of this.
Started](index.md#explore-the-application-and-run-examples) is
an example of this.
```bash
$ docker run -d -p 80:80 --name webserver nginx
@ -124,12 +111,3 @@ $ docker run -d -P --name webserver nginx
See the [run command](/engine/reference/commandline/run.md) for more details on
publish options used with `docker run`.
#### A view into implementation
We understand that these workarounds are not ideal, but there are several
problems. In particular, there is a bug in macOS that is only fixed in 10.12 and
is not being backported as far as we can tell, which means that we could not
support this in all supported macOS versions. In addition, this network setup
would require root access which we are trying to avoid entirely in Docker for
Mac (we currently have a very small root helper that we are trying to remove).

View File

@ -7,7 +7,7 @@ notoc: true
Docker Desktop Editions are built using open source software.
For details on the licensing, choose
![whale menu](/docker-for-mac/images/whale-x.png){: .inline} -->
![whale menu](images/whale-x.png){: .inline} -->
**About Docker** from within the application, then click **Acknowledgements**.
Docker Desktop Editions distribute some components that are licensed under the

View File

@ -11,7 +11,7 @@ for two new flags to the [docker run `-v`,
option, `cached` and `delegated`, that can significantly improve the performance
of mounted volume access on Docker for Mac. These options begin to solve some of
the challenges discussed in [Performance issues, solutions, and
roadmap](/docker-for-mac/osxfs.md#performance-issues-solutions-and-roadmap).
roadmap](osxfs.md#performance-issues-solutions-and-roadmap).
> **Tip:** Release notes for Docker CE Edge 17.04 are
[here](https://github.com/moby/moby/releases/tag/v17.04.0-ce), and the

View File

@ -62,8 +62,8 @@ bin dev home lib32 libx32 mnt proc run srv tmp var
By default, you can share files in `/Users/`, `/Volumes/`, `/private/`, and
`/tmp` directly. To add or remove directory trees that are exported to Docker,
use the **File sharing** tab in Docker preferences ![whale
menu](/docker-for-mac/images/whale-x.png){: .inline} -> **Preferences** ->
**File sharing**. (See [Preferences](/docker-for-mac/index.md#preferences).)
menu](images/whale-x.png){: .inline} -> **Preferences** ->
**File sharing**. (See [Preferences](index.md#preferences).)
All other paths
used in `-v` bind mounts are sourced from the Moby Linux VM running the Docker
@ -73,7 +73,7 @@ VM, an attempt to bind mount it fails rather than create it in the VM. Paths
that already exist in the VM and contain files are reserved by Docker and cannot
be exported from macOS.
> See **[Performance tuning for volume mounts (shared filesystems)](/docker-for-mac/osxfs-caching.md)**
> See **[Performance tuning for volume mounts (shared filesystems)](osxfs-caching.md)**
> to learn about new configuration options available with the Docker 17.04 CE Edge release.
### Ownership
@ -155,7 +155,7 @@ between macOS userspace processes and the macOS kernel.
### Performance issues, solutions, and roadmap
> See **[Performance tuning for volume mounts (shared filesystems)](/docker-for-mac/osxfs-caching.md)**
> See **[Performance tuning for volume mounts (shared filesystems)](osxfs-caching.md)**
> to learn about new configuration options available with the Docker 17.04 CE Edge release.
With regard to reported performance issues ([GitHub issue 77: File access in

View File

@ -19,56 +19,31 @@ technical support for various subscription levels.
## Diagnose problems, send feedback, and create GitHub issues
If you encounter problems for which you do not find solutions in this
documentation, [Docker for Mac issues on
GitHub](https://github.com/docker/for-mac/issues) already filed by other users,
or on the [Docker for Mac forum](https://forums.docker.com/c/docker-for-mac), we
can help you troubleshoot the log data.
documentation, on [Docker for Mac issues on
GitHub](https://github.com/docker/for-mac/issues), or the [Docker for Mac
forum](https://forums.docker.com/c/docker-for-mac), we can help you troubleshoot
the log data.
Choose ![whale menu](/docker-for-mac/images/whale-x.png){: .inline} -->
Choose ![whale menu](images/whale-x.png){: .inline} -->
**Diagnose & Feedback** from the menu bar.
![Diagnose problems](images/settings-diagnose.png)
![Diagnose & Feedback](images/diagnose-feedback.png)
You can choose to run diagnostics only, or diagnose and send the results to the
Docker Team:
Select **Diagnose**. It runs diagnostics, shows results, and uploads the
results to Docker. A diagnostic ID is generated, which must be provided when
communicating with the Docker Team. Optionally, you can open an issue on GitHub
using the uploaded results and ID as a basis.
* **Diagnose Only** - Runs diagnostics, and shows results locally. (Results are not sent to Docker, and no ID is generated.)
![Diagnostics & Feedback with ID](images/diagnose-feedback-id.png)
![Diagnostic results only](images/settings-diagnostic-results-only.png)
* **Diagnose & Upload** - Runs diagnostics, shows results, and auto-uploads the
diagnostic results to Docker. A diagnostic ID is auto-generated. You can refer
to this ID when communicating with the Docker Team. Optionally, you can open
an issue on GitHub using the uploaded results and ID as a basis.
![Diagnostics & Feedback](images/settings-diagnose-id.png)
If you click **Open Issues**, this opens [Docker for Mac issues on
If you click **Report an issue**, this opens [Docker for Mac issues on
GitHub](https://github.com/docker/for-mac/issues/) in your web browser in a
“create new issue” template prepopulated with the following:
“create new issue” template, to be completed before submission.
* ID and summary of the diagnostic you just ran
![issue template](images/issues-template.png)
* System and version details
* Sections where you can fill in a description of expected and actual behavior,
and steps to reproduce the issue
![Create issue on GitHub](images/diagnose-issue.png)
You can also create a new issue directly on GitHub at
[https://github.com/docker/for-mac/issues](https://github.com/docker/for-mac/issues).
(The README for the repository is [here](https://github.com/docker/for-mac).)
Click [New Issue](https://github.com/docker/for-mac/issues/new) on that page (or
right here &#9786;) to get a "create new issue" template prepopulated with
sections for the ID and summary of your diagnostics, system and version details,
description of expected and actual behavior, and steps to reproduce the issue.
![issue template](images/diagnose-d4mac-issues-template.png)
<a name="logs"></a>
## Check the logs
In addition to using the diagnose and feedback option to submit logs, you can
@ -140,7 +115,7 @@ As well as on the registry. For example:
```
For more about using client and server side certificates, see [Adding
TLS certificates](/docker-for-mac/index.md#adding-tls-certificates) in
TLS certificates](index.md#adding-tls-certificates) in
the Getting Started topic.
### Docker for Mac does not start if Mac user account and home folder are renamed after installing the app
@ -160,10 +135,10 @@ in the FAQs.
If you are using mounted volumes and get runtime errors indicating an
application file is not found, access to a volume mount is denied, or a service cannot
start, such as when using [Docker Compose](/compose/gettingstarted.md), you might
need to enable [file sharing](/docker-for-mac/index.md#file-sharing).
need to enable [file sharing](index.md#file-sharing).
Volume mounting requires shared drives for projects that live outside of the
`/Users` directory. Go to ![whale menu](/docker-for-mac/images/whale-x.png){:
`/Users` directory. Go to ![whale menu](images/whale-x.png){:
.inline} --> **Preferences** --> **File sharing** and share the drive that
contains the Dockerfile and volume.
@ -283,7 +258,7 @@ know before you install](install.md#what-to-know-before-you-install).
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).
newer](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:
@ -309,7 +284,7 @@ know before you install](install.md#what-to-know-before-you-install).
* 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 ( ![whale menu](/docker-for-mac/images/whale-x.png){: .inline} -->
application ( ![whale menu](images/whale-x.png){: .inline} -->
**Quit Docker**). Otherwise, you get an "application in use" error when you
try to copy the new app from the `.dmg` to `/Applications`.
@ -379,7 +354,7 @@ know before you install](install.md#what-to-know-before-you-install).
resources. Reboot and restart Docker to resolve these issues.
* Docker does not auto-start on login even when it is enabled in ![whale
menu](/docker-for-mac/images/whale-x.png){: .inline} --> **Preferences**. This
menu](images/whale-x.png){: .inline} --> **Preferences**. This
is related to a set of issues with Docker helper, registration, and
versioning.

View File

@ -17,7 +17,7 @@ prompts users to migrate from Docker Toolbox--you must do so manually.
> previous Docker Toolbox data.
1. Install [qemu](https://www.qemu.org/){: target="_blank" class="_"} (a machine emulator): [https://cloudbase.it/downloads/qemu-img-win-x64-2_3_0.zip](https://cloudbase.it/downloads/qemu-img-win-x64-2_3_0.zip).
2. Install [Docker for Windows](/docker-for-windows/install/){: target="_blank" class="_"}.
2. Install [Docker for Windows](install/){: target="_blank" class="_"}.
3. Stop Docker for Windows, if running.
4. Move your current Docker VM disk to a safe location:

View File

@ -731,9 +731,9 @@ registry access (fixes [docker/for-win#569](https://github.com/docker/for-win/is
**New**
- Windows containers settings panel and options are working. In previous releases, settings were not implemented for [Windows containers
mode](/docker-for-windows/index.md#switch-between-windows-and-linux-containers-beta-feature). (See
mode](index.md#switch-between-windows-and-linux-containers-beta-feature). (See
[About the Docker Windows containers specific
dialogs](/docker-for-windows/index.md#about-the-docker-windows-containers-specific-dialogs).)
dialogs](index.md#about-the-docker-windows-containers-specific-dialogs).)
- Windows containers: Restart from the settings panel works
- Windows containers: Factory default
- Windows containers: `Daemon.json` can be modified
@ -1071,7 +1071,7 @@ Unreleased. See Beta 23 for changes.
**New**
* Docker for Windows is now available from 2 channels: **stable** and **beta**. New features and bug fixes go out first in auto-updates to users in the beta channel. Updates to the stable channel are much less frequent and happen in sync with major and minor releases of the Docker engine. Only features that are well-tested and ready for production are added to the stable channel releases. For downloads of both and more information, see the [Getting Started](/docker-for-windows/index.md#download-docker-for-windows).
* Docker for Windows is now available from 2 channels: **stable** and **beta**. New features and bug fixes go out first in auto-updates to users in the beta channel. Updates to the stable channel are much less frequent and happen in sync with major and minor releases of the Docker engine. Only features that are well-tested and ready for production are added to the stable channel releases. For downloads of both and more information, see the [Getting Started](index.md#download-docker-for-windows).
* Removed the docker host name. Containers with exported ports are reachable via localhost.

View File

@ -14,7 +14,7 @@ technical support for various subscription levels, and more.
#### How do I get the Stable or Edge version of 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).
Windows](install.md#download-docker-for-windows).
This topic also has more information about the two channels.
@ -85,13 +85,13 @@ in [Docker Swarm](/engine/swarm/index.md). A good place to start is the
#### What if I have problems or questions?
You can find the list of frequent issues in
[Logs and Troubleshooting](/docker-for-windows/troubleshoot.md).
[Logs and Troubleshooting](troubleshoot.md).
If you do not find a solution in Troubleshooting, browse issues on [Docker for
Windows issues on GitHub](https://github.com/docker/for-win/issues) or create a
new one. You can also create new issues based on diagnostics. To learn more
about running diagnostics and about Docker for Windows GitHub issues, see
[Diagnose and Feedback](/docker-for-windows/index.md#diagnose-and-feedback).
[Diagnose and Feedback](index.md#diagnose-and-feedback).
[Docker for Windows forum](https://forums.docker.com/c/docker-for-windows)
provides discussion threads as well, and you can create discussion topics there,
@ -130,7 +130,7 @@ topic
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,
volumes](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
@ -145,7 +145,7 @@ volumes](troubleshoot.md#permissions-errors-on-data-directories-for-shared-volum
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).
[Troubleshooting](troubleshoot.md).
#### Are symlinks supported?
@ -195,7 +195,7 @@ 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
Daemon](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.
@ -222,7 +222,7 @@ Docker for Windows does not support mounts for nodes you created with
`docker-machine`.
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
see [Shared Drives](index.md#shared-drives) in the Getting
Started topic.
To learn more about using Docker for Windows and Docker Machine, see [What to
@ -236,7 +236,7 @@ driver](/machine/drivers/hyper-v.md) for Docker Machine.
#### 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).
2016](index.md#about-windows-containers-and-windows-server-2016).
A full tutorial is available in [docker/labs](https://github.com/docker/labs) at
[Getting Started with Windows
@ -260,7 +260,7 @@ 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)
in [Troubleshooting](/docker-for-windows/troubleshoot.md).
in [Troubleshooting](troubleshoot.md).
### How do I uninstall Docker Toolbox?

View File

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 175 KiB

View File

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 148 KiB

View File

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View File

@ -25,7 +25,7 @@ and edge channels, system requirements, and download/install information.
[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
## Check versions
Start your favorite shell (`cmd.exe`, PowerShell, or other) to check your versions of `docker` and `docker-compose`, and verify the installation.
@ -40,7 +40,7 @@ PS C:\Users\Docker> docker-machine --version
docker-machine version 0.10.0, build 76ed2a6
```
## Explore the application and run examples
## Explore the application
The next few steps take you through some examples. These are just suggestions
for ways to experiment with Docker on your system, check version information,
@ -237,86 +237,6 @@ and make sure `docker` commands are working properly.
**Want more example applications?** [Get Started](/get-started/) and [Samples](/samples) are great places to start.
## Set up tab completion in PowerShell
If you would like to have handy tab completion for Docker commands, you can
install the [`posh-docker`](https://github.com/samneirinck/posh-docker)
PowerShell Module as follows.
> Prerequisite Notes
>
> * Depending on your setup, you might need the [NuGet package manager](https://www.nuget.org/){: target="_blank" class="_" } so you might get a prompt to install it.
>
> * Make sure you have administrator permissions to run an elevated PowerShell.
1. Start an "elevated" PowerShell, running as an administrator.
To do this, search for PowerShell, right-click, and choose **Run as administrator**.
![Run PowerShell as administrator](/docker-for-windows/images/PowerShell-as-admin.png)
When asked if you want to allow this app to make changes to your device,
click **Yes**.
2. Set the
[script execution policy](https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.security/set-executionpolicy)
to allow downloaded scripts signed by trusted publishers to run on your
computer. To do so, type this at the PowerShell prompt.
```ps
Set-ExecutionPolicy RemoteSigned
```
To check that the policy is set properly, run `get-executionpolicy`, which
should return `RemoteSigned`.
3. To install the `posh-docker` PowerShell module for auto-completion of Docker commands, type:
```ps
Install-Module posh-docker
```
Or, to install the module for the current user only, type:
```ps
Install-Module -Scope CurrentUser posh-docker
```
4. After installation to enable autocompletion for the current PowerShell only, type:
```ps
Import-Module posh-docker
```
5. To make tab completion persistent across all PowerShell sessions, add the
command to a `$PROFILE` by typing these commands at the PowerShell prompt.
```ps
if (-Not (Test-Path $PROFILE)) {
New-Item $PROFILE Type File Force
}
Add-Content $PROFILE "`nImport-Module posh-docker"
```
This creates a `$PROFILE` if one does not already exist, and adds this line
into the file:
```ps
Import-Module posh-docker
```
To check that the file was properly created, or simply edit it manually,
type this in PowerShell:
```ps
Notepad $PROFILE
```
Open a new PowerShell session. Now, when you press tab after typing the first
few letters, Docker commands such as `start`, `stop`, `run`, and their options,
along with container and image names should now auto-complete.
## Docker Settings
When Docker is running, the Docker whale is displayed. By default, the Docker
@ -330,13 +250,13 @@ arrow on the taskbar to show it.
right-click an empty portion of the taskbar, select Settings, and choose
display options through taskbar settings for notifications.
>
> ![whale pinned to taskbar](/docker-for-windows/images/whale-taskbar.png)
> ![whale pinned to taskbar](images/whale-taskbar.png)
![Showing hidden apps in the taskbar](/docker-for-windows/images/whale-systray.png)
![Showing hidden apps in the taskbar](images/whale-systray.png)
To get a popup menu with application options, right-click the whale:
![Docker for Windows popup menu](/docker-for-windows/images/config-popup-menu-win.png)
![Docker for Windows popup menu](images/config-popup-menu-win.png)
>**Note:** The above example shows a user signed in for integrated
Docker Cloud access. To learn more about the feature, see
@ -349,7 +269,7 @@ perform a factory reset.
### General
![Settings](/docker-for-windows/images/settings-general.png)
![Settings](images/settings-general.png)
* **Start Docker when you log in** - Automatically start the Docker for Windows
application upon Windows system login.
@ -402,7 +322,7 @@ container](/engine/tutorials/dockervolumes.md#creating-and-mounting-a-data-volum
There are a number of issues with using host-mounted volumes and network paths
for database files. see the troubleshooting topic on [Volume mounts from
host paths use a nobrl option to override database
locking](/docker-for-windows/troubleshoot.md#volume-mounts-from-host-paths-use-a-nobrl-option-to-override-database-locking).
locking](troubleshoot.md#volume-mounts-from-host-paths-use-a-nobrl-option-to-override-database-locking).
>
* You cannot control (`chmod`) permissions on shared volumes for
deployed containers. Docker for Windows sets permissions to a default value of
@ -427,7 +347,7 @@ machine that runs Linux containers.
> **Note**: Docker detects if port 445 is closed and shows
the following message when you try to add a shared drive: ![Port 445
blocked](/docker-for-windows/images/drive_sharing_firewall_blocked.png)
blocked](images/drive_sharing_firewall_blocked.png)
To share the drive, allow connections between the Windows host machine and the
virtual machine in Windows Firewall or your third party firewall software. You
@ -447,15 +367,15 @@ example below) or kick off a Compose file that includes volume mounts, you get a
popup asking if you want to share the specified drive.
You can select to **Share it**, in which case it is added your Docker for
Windows [Shared Drives list](/docker-for-windows/index.md#shared-drives) and
Windows [Shared Drives list](index.md#shared-drives) and
available to containers. Alternatively, you can opt not to share it by hitting
Cancel.
![ ](/docker-for-windows/images/shared-drive-on-demand.png)
![ ](images/shared-drive-on-demand.png)
### Advanced
![CPU and Memory settings](/docker-for-windows/images/settings-cpu-ram.png)
![CPU and Memory settings](images/settings-cpu-ram.png)
* **CPUs** - Change the number of processors assigned to the Linux VM.
@ -471,7 +391,7 @@ You can configure Docker for Windows networking to work on a virtual private net
* **DNS Server** - You can configure the DNS server to use dynamic or static IP addressing.
![Network settings](/docker-for-windows/images/settings-network.png)
![Network settings](images/settings-network.png)
> **Note**: Some users reported problems connecting to Docker Hub on Docker for
> Windows stable version. This would manifest as an error when trying to run
@ -485,10 +405,12 @@ Updating these settings requires a reconfiguration and reboot of the Linux VM.
### Proxies
Docker for Windows lets you configure 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.
Docker for Windows lets you configure HTTP/HTTPS Proxy Settings and
automatically propagates 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.
![Proxies](/docker-for-windows/images/proxies.png)
![Proxies](images/proxies.png)
When you start a container, your proxy settings propagate into the containers. For example:
@ -508,7 +430,7 @@ When your proxy configuration changes, Docker restarts automatically to pick up
If you have containers that you wish to keep running across restarts, you should consider using [restart policies](/engine/reference/run/#restart-policies-restart).
<p id="daemon-experimental-mode" />
### Docker daemon
### Daemon
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.
@ -519,9 +441,9 @@ some of the common settings to make it easier to configure them.
* [Experimental mode](#experimental-mode)
* [Custom registries](#custom-registries)
* [Edit the daemon configuration file](#edit-the-daemon-configuration-file)
* [Daemon configuration file](#daemon-configuration-file)
![Docker Daemon](/docker-for-windows/images/docker-daemon_basic.png)
![Docker Daemon](images/docker-daemon_basic.png)
#### Experimental mode
@ -578,12 +500,12 @@ registries and registry mirrors on which to host your images. (See also, [How do
I add custom CA certificates?](faqs.md#how-do-i-add-custom-ca-certificates) and [How do I add client certificates?](faqs.md#how-do-i-add-client-certificates) in
the FAQs.)
#### Edit the daemon configuration file
#### Daemon configuration file
The **Advanced** daemon settings provide the original option to directly edit
the JSON configuration file for the [daemon](/engine/reference/commandline/dockerd.md).
![Docker Daemon](/docker-for-windows/images/docker-daemon_advanced.png)
![Docker Daemon](images/docker-daemon_advanced.png)
For a full list of options on the Docker daemon, see
[daemon](/engine/reference/commandline/dockerd.md) in the Docker Engine command
@ -669,7 +591,178 @@ because they do not apply to Windows containers:
* [Network](#network)
* [Advanced (CPU and Memory configuration)](#advanced)
### Docker Store
### Kubernetes
**Kubernetes is only available in Docker for Windows 18.02 CE Edge.** Kubernetes
support is not included in Docker for Windows 18.02 CE Stable.
To find out more about Stable and Edge channels and how to switch between them,
see [General configuration](#general).
Docker for Windows 18.02 CE Edge includes a standalone Kubernetes server that runs
on your Windows host, so that you can test deploying your Docker workloads on Kubernetes.
The Kubernetes client command, `kubectl`, is included and configured to connect
to the local Kubernetes server. If you have `kubectl` already installed and
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
```
If you installed `kubectl` by another method, and
experience conflicts, remove it.
- 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.
![Enable Kubernetes](images/kubernetes/kubernetes-enable.png)
An internet connection is required. Images required to run the Kubernetes
server are downloaded and instantiated as containers, and the
`C:\>Program Files\Docker\Docker\Resources\bin\kubectl.exe` command is installed.
When Kubernetes is enabled and running, an additional status bar item displays
at the bottom left of the Docker for Windows Preferences dialog.
![Kubernetes status](images/kubernetes/kubernetes-status.png)
- By default, Kubernetes containers are hidden from commands like `docker
service ls`, because managing them manually is not supported. To make them
visible, select **Show system containers (advanced)** and click **Apply and restart**.
Most users do not need this option.
- To disable Kubernetes support at any time, deselect **Enable Kubernetes**.
The Kubernetes containers are stopped and removed, and the
`/usr/local/bin/kubectl` command is removed.
For more about using the Kubernetes integration with
Docker for Windows, see [Deploy to Kubernetes](kubernetes.md).
### Reset
![Reset](images/settings-reset.png)
* **Restart Docker** - Shuts down and restarts the Docker application.
* **Reset to Toolbox default machine content** - Imports containers and images
from the existing Docker Toolbox machine named `default`. (This option is
enabled only if you have Toolbox installed.) The VirtualBox VM is not
removed.
* **Reset to factory defaults** - Resets Docker to factory defaults. This is
useful in cases where Docker stops working or becomes unresponsive.
## Adding TLS certificates
You can add trusted Certificate Authorities (CAs) (used to verify registry
server certificates) and client certificates (used to authenticate to
registries) to your Docker daemon.
To learn more, see [How do I add custom CA
certificates?](faqs.md#how-do-i-add-custom-ca-certificates)
and [How do I add client
certificates?](faqs.md#how-do-i-add-client-certificates) in
the FAQs.
## Set up tab completion in PowerShell
If you would like to have handy tab completion for Docker commands, you can
install the [`posh-docker`](https://github.com/samneirinck/posh-docker)
PowerShell Module as follows.
> Prerequisite Notes
>
> * Depending on your setup, you might need the [NuGet package manager](https://www.nuget.org/){: target="_blank" class="_" } so you might get a prompt to install it.
>
> * Make sure you have administrator permissions to run an elevated PowerShell.
1. Start an "elevated" PowerShell, running as an administrator.
To do this, search for PowerShell, right-click, and choose **Run as administrator**.
![Run PowerShell as administrator](images/PowerShell-as-admin.png)
When asked if you want to allow this app to make changes to your device,
click **Yes**.
2. Set the
[script execution policy](https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.security/set-executionpolicy)
to allow downloaded scripts signed by trusted publishers to run on your
computer. To do so, type this at the PowerShell prompt.
```ps
Set-ExecutionPolicy RemoteSigned
```
To check that the policy is set properly, run `get-executionpolicy`, which
should return `RemoteSigned`.
3. To install the `posh-docker` PowerShell module for auto-completion of Docker commands, type:
```ps
Install-Module posh-docker
```
Or, to install the module for the current user only, type:
```ps
Install-Module -Scope CurrentUser posh-docker
```
4. After installation to enable autocompletion for the current PowerShell only, type:
```ps
Import-Module posh-docker
```
5. To make tab completion persistent across all PowerShell sessions, add the
command to a `$PROFILE` by typing these commands at the PowerShell prompt.
```ps
if (-Not (Test-Path $PROFILE)) {
New-Item $PROFILE Type File Force
}
Add-Content $PROFILE "`nImport-Module posh-docker"
```
This creates a `$PROFILE` if one does not already exist, and adds this line
into the file:
```ps
Import-Module posh-docker
```
To check that the file was properly created, or simply edit it manually,
type this in PowerShell:
```ps
Notepad $PROFILE
```
Open a new PowerShell session. Now, when you press tab after typing the first
few letters, Docker commands such as `start`, `stop`, `run`, and their options,
along with container and image names should now auto-complete.
## 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 Windows
forum](https://forums.docker.com/c/docker-for-windows).
To report bugs or problems, log on to [Docker for Windows issues on
GitHub](https://github.com/docker/for-win/issues), where you can
review community reported issues, and file new ones. See [Logs and
Troubleshooting](troubleshoot.md) for more details.
To give feedback on the documentation or update it yourself, use the Feedback
options at the bottom of each docs page.
## Docker Store
Choose **Docker Store** from the Docker for Windows menu to get to the Docker
app downloads site. [Docker store](https://store.docker.com/) is a component of
@ -678,7 +771,7 @@ commercial and free software distributed as Docker Images.
![Docker Store](images/docker-store.png)
### Docker Cloud
## Docker Cloud
You can access your [Docker Cloud](/docker-cloud/index.md) account from
within Docker for Windows.
@ -703,123 +796,6 @@ Check out these [Docker Cloud topics](/docker-cloud/index.md) to learn more:
Need a direct link to Cloud? [Take me to Docker
Cloud](https://cloud.docker.com/){: target="_blank" class="_" }.
### Kubernetes
**Kubernetes is only available in Docker for Windows 18.02 CE Edge.** Kubernetes
support is not included in Docker for Windows 18.02 CE Stable.
To find out more about Stable and Edge channels and how to switch between them,
see [General configuration](/docker-for-windows/#general).
Docker for Windows 18.02 CE Edge includes a standalone Kubernetes server that runs
on your Windows host, so that you can test deploying your Docker workloads on Kubernetes.
The Kubernetes client command, `kubectl`, is included and configured to connect
to the local Kubernetes server. If you have `kubectl` already installed and
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
```
If you installed `kubectl` by another method, and
experience conflicts, remove it.
- 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.
![Enable Kubernetes](/docker-for-windows/images/kubernetes/kubernetes-enable.png)
An internet connection is required. Images required to run the Kubernetes
server are downloaded and instantiated as containers, and the
`C:\>Program Files\Docker\Docker\Resources\bin\kubectl.exe` command is installed.
When Kubernetes is enabled and running, an additional status bar item displays
at the bottom left of the Docker for Windows Preferences dialog.
![Kubernetes status](/docker-for-windows/images/kubernetes/kubernetes-status.png)
- By default, Kubernetes containers are hidden from commands like `docker
service ls`, because managing them manually is not supported. To make them
visible, select **Show system containers (advanced)** and click **Apply and restart**.
Most users do not need this option.
- To disable Kubernetes support at any time, deselect **Enable Kubernetes**.
The Kubernetes containers are stopped and removed, and the
`/usr/local/bin/kubectl` command is removed.
For more about using the Kubernetes integration with
Docker for Windows, see [Deploy to Kubernetes](/docker-for-windows/kubernetes.md).
### Giving feedback and getting help
To get help from the community, review current user topics, join or start a
discussion, log on to our [Docker for Windows
forum](https://forums.docker.com/c/docker-for-windows).
To report bugs or problems, log on to [Docker for Windows issues on
GitHub](https://github.com/docker/for-win/issues), where you can review
community reported issues, and file new ones. As a part of reporting issues on
GitHub, we can help you troubleshoot the log data. See the
[Diagnose and Feedback](#diagnose-and-feedback) topic below.
To give feedback on the documentation or update it yourself, use the Feedback
options at the bottom of each docs page.
### Diagnose and Feedback
If you encounter problems for which you do not find solutions in this
documentation, searching [Docker for Windows issues on
GitHub](https://github.com/docker/for-win/issues) already filed by other users,
or on the [Docker for Windows
forum](https://forums.docker.com/c/docker-for-windows), we can help you
troubleshoot the log data.
Select **Upload a diagnostic**.
This uploads (sends) the logs to Docker.
![Diagnose problems and Feedback](/docker-for-windows/images/diagnose-feedback-id-win.png)
To create a new issue directly on GitHub, open
[Docker for Windows issues on GitHub](https://github.com/docker/for-win/issues)
in your web browser and follow the instructions in the README. Click
[New Issue](https://github.com/docker/for-win/issues/new) on that page to get a
"create new issue" template prepopulated with sections for the ID and summary of
your diagnostics, system and version details, description of expected and actual
behavior, and steps to reproduce the issue.
![issue template](/docker-for-windows/images/diagnose-d4win-issues-template.png)
### Reset
![Reset](/docker-for-windows/images/settings-reset.png)
* **Restart Docker** - Shuts down and restarts the Docker application.
* **Reset to Toolbox default machine content** - Imports containers and images
from the existing Docker Toolbox machine named `default`. (This option is
enabled only if you have Toolbox installed.) The VirtualBox VM is not
removed.
* **Reset to factory defaults** - Resets Docker to factory defaults. This is
useful in cases where Docker stops working or becomes unresponsive.
## Adding TLS certificates
You can add trusted Certificate Authorities (CAs) (used to verify registry
server certificates) and client certificates (used to authenticate to
registries) to your Docker daemon.
To learn more, see [How do I add custom CA
certificates?](/docker-for-windows/faqs.md#how-do-i-add-custom-ca-certificates)
and [How do I add client
certificates?](/docker-for-windows/faqs.md#how-do-i-add-client-certificates) in
the FAQs.
## Where to go next
* Try out the walkthrough at [Get Started](/get-started/).

View File

@ -30,13 +30,13 @@ download installers from the **Stable** or **Edge** channel.
Both Stable and Edge installers come with <a
href="https://github.com/docker/cli/blob/master/experimental/README.md">
experimental features in Docker Engine</a> enabled by default. Experimental mode can be toggled on and off in [preferences](/docker-for-windows/index.md#daemon-experimental-mode).
experimental features in Docker Engine</a> enabled by default. Experimental mode can be toggled on and off in [preferences](index.md#daemon-experimental-mode).
We welcome your
[feedback](/docker-for-windows/index.md#giving-feedback-and-getting-help) to help us improve Docker for Windows.
[feedback](index.md#giving-feedback-and-getting-help) to help us improve Docker for Windows.
For more about Stable and Edge channels, see the
[FAQs](/docker-for-windows/faqs.md#questions-about-stable-and-edge-channels).
[FAQs](faqs.md#questions-about-stable-and-edge-channels).
<table style="width:100%">
<tr>
@ -70,14 +70,14 @@ For more about Stable and Edge channels, see the
* Docker for Windows is designed to configure Docker development environments on Windows 10. You can develop both Docker Linux containers and Docker Windows containers with Docker for Windows. To run Docker Windows containers in production, see instructions for [installing Docker EE on Windows Server 2016](/install/windows/docker-ee.md). To run Docker Linux containers in production, see [instructions for installing Docker on Linux](/install/index.md).
* Docker for Windows requires 64bit Windows 10 Pro with Hyper-V available. See [What to know before you install](/docker-for-windows/install.md#what-to-know-before-you-install) for a full list
* Docker for Windows requires 64bit Windows 10 Pro with Hyper-V available. See [What to know before you install](install.md#what-to-know-before-you-install) for a full list
of prerequisites.
* You can switch between Edge and Stable versions, but you can only have one
app installed at a time. Also, you need to save images and export
containers you want to keep before uninstalling the current version before
installing another. For more about this, see the [FAQs about Stable and Edge
channels](/docker-for-windows/faqs.md#questions-about-stable-and-edge-channels).
channels](faqs.md#questions-about-stable-and-edge-channels).
## What to know before you install
@ -112,7 +112,7 @@ guarantees. For more information, see
Looking for information on using Windows containers?
* [Switch between Windows and Linux containers](/docker-for-windows/index.md#switch-between-windows-and-linux-containers) describes the Linux / Windows containers toggle in Docker for Windows and points you to the tutorial mentioned above.
* [Switch between Windows and Linux containers](index.md#switch-between-windows-and-linux-containers) describes the Linux / Windows containers toggle in Docker for Windows and points you to the tutorial mentioned above.
<p />
* [Getting Started with Windows Containers (Lab)](https://github.com/docker/labs/blob/master/windows/windows-containers/README.md)
provides a tutorial on how to set up and run Windows containers on Windows 10 or
@ -138,27 +138,27 @@ Windows containers.
3. Click **Finish** on the setup complete dialog to launch Docker.
![Install complete>](/docker-for-windows/images/installer-finishes.png)
![Install complete>](images/installer-finishes.png)
## Start Docker for Windows
Docker does not start automatically. To start it, search for Docker, select the
app in the search results, and click it (or hit Return).
![search for Docker app](/docker-for-windows/images/docker-app-search.png)
![search for Docker app](images/docker-app-search.png)
When the whale in the status bar stays steady, Docker is up-and-running, and
accessible from any terminal window.
![whale on taskbar](/docker-for-windows/images/whale-taskbar-circle.png)
![whale on taskbar](images/whale-taskbar-circle.png)
If the whale is hidden in the Notifications area, click the up arrow on the
taskbar to show it. To learn more, see [Docker Settings](/docker-for-windows/index.md#docker-settings).
taskbar to show it. To learn more, see [Docker Settings](index.md#docker-settings).
If you just installed the app, you also get a popup success message with
suggested next steps, and a link to this documentation.
![Startup information](/docker-for-windows/images/win-install-success-popup-cloud.png)
![Startup information](images/win-install-success-popup-cloud.png)
When initialization is complete, select **About Docker** from the notification
area icon to verify that you have the latest version.

View File

@ -0,0 +1,113 @@
---
description: Networking
keywords: windows, networking
title: Networking features in Docker for Windows
---
{% assign Arch = 'Windows' %}
Docker for {{Arch}} provides several networking features to make it easier to
use.
## Features
### VPN Passthrough
Docker for {{Arch}}'s networking can work when attached to a VPN. To do this,
Docker for {{Arch}} intercepts traffic from the containers and injects it into
{{Arch}} as if it originated from the Docker application.
### Port Mapping
When you run a container with the `-p` argument, for example:
```
$ docker run -p 80:80 -d nginx
```
Docker for {{Arch}} makes whatever is running on port 80 in the container (in
this case, `nginx`) available on port 80 of `localhost`. In this example, the
host and container ports are the same. What if you need to specify a different
host port? If, for example, you already have something running on port 80 of
your host machine, you can connect the container to a different port:
```
$ docker run -p 8000:80 -d nginx
```
Now, connections to `localhost:8000` are sent to port 80 in the container. The
syntax for `-p` is `HOST_PORT:CLIENT_PORT`.
### HTTP/HTTPS Proxy Support
See [Proxies](index.md:Proxies).
## Known limitations, use cases, and workarounds
Following is a summary of current limitations on the Docker for {{Arch}}
networking stack, along with some ideas for workarounds.
### There is no docker0 bridge on {{Arch}}
Because of the way networking is implemented in Docker for {{Arch}}, you cannot
see a `docker0` interface on the host. This interface is actually within the
virtual machine.
### I cannot ping my containers
Docker for Windows can't route traffic to Linux containers. However, you can
ping the Windows containers.
### Per-container IP addressing is not possible
The docker (Linux) bridge network is not reachable from the Windows host.
However, it works with Windows containers.
### Use cases and workarounds
There are two scenarios that the above limitations affect:
#### I want to connect from a container to a service on the host
The host has a changing IP address (or none if you have no network access). From
18.03 onwards our recommendation is to connect to the special DNS name
`host.docker.internal`, which resolves to the internal IP address used by the
host.
The gateway is also reachable as `gateway.docker.internal`.
#### I want to connect to a container from the Windows
Port forwarding works for `localhost`; `--publish`, `-p`, or `-P` all work.
Ports exposed from Linux are forwarded to the host.
Our current recommendation is to publish a port, or to connect from another
container. This is what you need to do even on Linux if the container is on an
overlay network, not a bridge network, as these are not routed.
The command to run the `nginx` webserver shown in [Getting
Started](index.md#explore-the-application-and-run-examples) is
an example of this.
```bash
$ docker run -d -p 80:80 --name webserver nginx
```
To clarify the syntax, the following two commands both expose port `80` on the
container to port `8000` on the host:
```bash
$ docker run --publish 8000:80 --name webserver nginx
$ docker run -p 8000:80 --name webserver nginx
```
To expose all ports, use the `-P` flag. For example, the following command
starts a container (in detached mode) and the `-P` exposes all ports on the
container to random ports on the host.
```bash
$ docker run -d -P --name webserver nginx
```
See the [run command](/engine/reference/commandline/run.md) for more details on
publish options used with `docker run`.

View File

@ -22,11 +22,27 @@ If you encounter problems for which you do not find solutions in this
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.
troubleshoot the log data.
## Checking the Logs
Choose **Diagnose & Feedback** from the menu bar.
![Diagnose & Feedback](images/diagnose-feedback.png)
Select **Upload a diagnostic**. It runs diagnostics, shows results, and uploads
the results to Docker. A diagnostic ID is generated, which must be provided
when communicating with the Docker Team. Optionally, you can open an issue on
GitHub using the uploaded results and ID as a basis.
![Diagnose & Feedback with ID](images/diagnose-feedback-id.png)
If you click on **docker/for-win** this opens [Docker for Windows issues on
GitHub](https://github.com/docker/for-win/issues/) in your web browser in a
“create new issue” template.
![issue template](images/issues-template.png)
## Check the Logs
In addition to using the diagnose and feedback option to submit logs, you can
browse the logs yourself.
@ -66,9 +82,9 @@ As well as on the registry. For example:
```
For more about using client and server side certificates, see [How do I add
custom CA certificates?](/docker-for-windows/index.md#how-do-i-add-custom-ca
custom CA certificates?](index.md#how-do-i-add-custom-ca
certificates) and [How do I add client
certificates?](/docker-for-windows/index.md#how-do-i-add-client-certificates) in
certificates?](index.md#how-do-i-add-client-certificates) in
the Getting Started topic.
### Volumes
@ -76,7 +92,7 @@ the Getting Started topic.
#### 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
volumes](index.md#shared-drives) to a default value of
[0755](http://permissions-calculator.org/decode/0755/) (`read`, `write`,
`execute` permissions for `user`, `read` and `execute` for `group`). If you are
working with applications that require permissions different than this default,
@ -99,7 +115,7 @@ which does not support fine-grained, `chmod` control over these permissions.
See also, [Can I change permissions on shared volumes for container-specific
deployment
requirements?](/docker-for-windows/faqs.md#can-i-change-permissions-on-shared-volumes-for-container-specific-deployment-requirements)
requirements?](faqs.md#can-i-change-permissions-on-shared-volumes-for-container-specific-deployment-requirements)
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).
@ -126,7 +142,7 @@ 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).
drives](index.md#shared-drives).
Volume mounting requires shared drives for Linux containers (not for Windows
containers). Go to ![whale menu](/docker-for-mac/images/whale-x.png){: .inline}
@ -136,11 +152,11 @@ Dockerfile and volume.
#### 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),
> containers](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
use to set up [shared drives](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.
@ -174,7 +190,7 @@ local user is `samstevens` and the domain user is `merlin`.
```
4. Re-share the drive via the [Shared Drives
dialog](/docker-for-windows/index.md#shared-drives), and provide the Windows
dialog](index.md#shared-drives), and provide the Windows
domain user account credentials.
5. Re-run `net share c`.
@ -222,7 +238,7 @@ Compose file documentation.
#### 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.
[shared drives](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
@ -364,7 +380,7 @@ Here are some steps to take if you encounter similar problems:
If you have questions about how to set up and run Windows containers on Windows
Server 2016 or Windows 10, see [About Windows containers and Windows Server
2016](/docker-for-windows/index.md#about-windows-containers-and-windows-server-2016).
2016](index.md#about-windows-containers-and-windows-server-2016).
A full tutorial is available in [docker/labs](https://github.com/docker/labs) at
[Getting Started with Windows
@ -519,7 +535,7 @@ 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
[Network](index.md#network). Docker automatically restarts
when you apply this setting, which could take some time.
We are currently investigating this issue.
@ -569,8 +585,8 @@ the adapter.
By default, Docker for Windows uses an internal network prefix of
`10.0.75.0/24`. Should this clash with your normal network setup, you can change
the prefix from the **Settings** menu. See the [Network](/docker-for-windows/index.md#network) topic
under [Settings](/docker-for-windows/index.md#docker-settings).
the prefix from the **Settings** menu. See the [Network](index.md#network) topic
under [Settings](index.md#docker-settings).
#### NAT/IP configuration issues on pre Beta 15 versions
@ -578,13 +594,13 @@ As of Beta 15, Docker for Windows is no longer using a switch with a NAT
configuration. The notes below are left here only for older Beta versions.
As of Beta14, networking for Docker for Windows is configurable through the UI.
See the [Network](/docker-for-windows/index.md#network) topic under
[Settings](/docker-for-windows/index.md#docker-settings).
See the [Network](index.md#network) topic under
[Settings](index.md#docker-settings).
By default, Docker for Windows uses an internal Hyper-V switch with a NAT
configuration with a `10.0.75.0/24` prefix. You can change the prefix used (as
well as the DNS server) via the **Settings** menu as described in the
[Network](/docker-for-windows/index.md#network) topic.
[Network](index.md#network) topic.
If you have additional Hyper-V VMs and they are attached to their own NAT
prefixes, the prefixes need to be managed carefully, due to limitation of the