Skip to content

Commit 1249d35

Browse files
author
Victoria Bialas
committedNov 16, 2016
added troubleshooting info about shared drives/files and volume mounting
added more changes updated per Nathan's comments on properly documenting directories formats for all platforms incorporated Daniel's review comments, and added a clarification re: users' dir copyedits Signed-off-by: Victoria Bialas <[email protected]>
1 parent 69b3a3d commit 1249d35

File tree

5 files changed

+113
-24
lines changed

5 files changed

+113
-24
lines changed
 

‎compose/gettingstarted.md

+18-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,23 @@ This Compose file defines two services, `web` and `redis`. The web service:
108108
* Mounts the project directory on the host to `/code` inside the container allowing you to modify the code without having to rebuild the image.
109109
* Links the web service to the Redis service.
110110

111-
The `redis` service uses the latest public [Redis](https://registry.hub.docker.com/_/redis/) image pulled from the Docker Hub registry.
111+
The `redis` service uses the latest public
112+
[Redis](https://registry.hub.docker.com/_/redis/) image pulled from the Docker
113+
Hub registry.
114+
115+
>**Tip:** If your project is outside of the `Users` directory (`cd ~`), then you
116+
need to share the drive or location of the Dockerfile and volume you are using.
117+
If you get runtime errors indicating an application file is not found, a volume
118+
mount is denied, or a service cannot start, try enabling file or drive sharing.
119+
Volume mounting requires shared drives for projects that live outside of
120+
`C:\Users` (Windows) or `/Users` (Mac), and is required for _any_ project on
121+
Docker for Windows that uses [Linux
122+
containers](/docker-for-windows/index.md#switch-between-windows-and-linux-containers-beta-feature).
123+
For more information, see [Shared
124+
Drives](../docker-for-windows/index.md#shared-drives) on Docker for Windows,
125+
[File sharing](../docker-for-mac/index.md#file-sharing) on Docker for Mac, and
126+
the general examples on how to [Manage data in
127+
containers](../engine/tutorials/dockervolumes.md).
112128

113129
## Step 4: Build and run your app with Compose
114130

@@ -180,4 +196,4 @@ At this point, you have seen the basics of how Compose works.
180196
- Next, try the quick start guide for [Django](django.md),
181197
[Rails](rails.md), or [WordPress](wordpress.md).
182198
- [Explore the full list of Compose commands](./reference/index.md)
183-
- [Compose configuration file reference](compose-file.md)
199+
- [Compose configuration file reference](compose-file.md)

‎docker-for-mac/index.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ There are some limitations on the directories that can be shared:
216216
217217
See [Namespaces](osxfs.md#namespaces) in the topic on [osxfs file system sharing](osxfs.md) for more information.
218218
219+
>**Tip:** File sharing is required for volume mounting if the project lives
220+
outside of the `/Users` directory. In that case, share the drive where the
221+
Dockerfile and volume are located. Otherwise, you will get file not found or
222+
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).)
223+
219224
#### Privacy
220225
221226
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.
@@ -283,4 +288,4 @@ ln -s /Applications/Docker.app/Contents/Resources/etc/docker-compose.bash-comple
283288

284289
* Check out the <a href="https://blog.docker.com/2016/06/docker-mac-windows-public-beta/">blog posts</a> on Docker for Mac and Docker for Windows public betas, and <a href="https://blog.docker.com/2016/03/docker-for-mac-windows-beta/">earlier posts</a> on the initial private beta.
285290

286-
* Please give feedback on your experience with the app and report bugs and problems by logging into our [Docker for Mac forum](https://forums.docker.com/c/docker-for-mac).
291+
* Please give feedback on your experience with the app and report bugs and problems by logging into our [Docker for Mac forum](https://forums.docker.com/c/docker-for-mac).

‎docker-for-mac/troubleshoot.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ redirect_from:
66
title: Logs and troubleshooting
77
---
88

9+
<!-- /TOC -->
10+
911
Here is information about how to diagnose and troubleshoot problems, send logs
1012
and communicate with the Docker for Mac team, use our forums and Knowledge Hub,
1113
browse and log issues on GitHub, and find workarounds for known problems.
@@ -115,6 +117,17 @@ auto-generated reports on packages.
115117

116118
## Troubleshooting
117119

120+
### Volume mounting requires file sharing for any project directories outside of `/Users`
121+
122+
If you are using mounted volumes and get runtime errors indicating an
123+
application file is not found, a volume mount is denied, or a service cannot
124+
start (e.g., with [Docker Compose](/compose/gettingstarted.md)), you might
125+
need to enable [file sharing](index.md#file-sharing).
126+
127+
Volume mounting requires shared drives for projects that live outside of the
128+
`/Users` directory. Go to <img src="images/whale-x.png"> --> **Preferences** -->
129+
**File sharing** and share the drive that contains the Dockerfile and volume.
130+
118131
### Recreate or update your containers after Beta 18 upgrade
119132

120133
Docker 1.12.0 RC3 release introduces a backward incompatible change from RC2 to
@@ -346,4 +359,4 @@ Alternatively you could create a plain-text TCP proxy on localhost:1234 using:
346359
Then restart the NTP service with:
347360

348361
sudo launchctl unload /System/Library/LaunchDaemons/org.ntp.ntpd.plist
349-
sudo launchctl load /System/Library/LaunchDaemons/org.ntp.ntpd.plist
362+
sudo launchctl load /System/Library/LaunchDaemons/org.ntp.ntpd.plist

‎docker-for-windows/index.md

+22-8
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,27 @@ Share your local drives (volumes) with Docker for Windows, so that they are avai
321321

322322
![Shared Drives](images/settings-shared-drives.png)
323323

324-
You will be asked to provide your Windows system username and password (domain user) to apply shared drives. You can select an option to have Docker store the credentials so that you don't have to re-enter them every time.
325-
326-
Permissions to access shared drives are tied to the credentials you provide here. If you run `docker` commands and tasks under a different username than the one used here to set up sharing, your containers will not have permissions to access the mounted volumes.
327-
328-
>**Tip:** Shared drives are only required for volume mounting [Linux containers](#switch-between-windows-and-linux-containers-beta-feature), not Windows containers.
329-
330-
See also [Verify domain user has permissions for shared drives](troubleshoot.md#verify-domain-user-has-permissions-for-shared-drives-volumes) in Troubleshooting.
324+
You will be asked to provide your Windows system username and password (domain
325+
user) to apply shared drives. You can select an option to have Docker store the
326+
credentials so that you don't have to re-enter them every time.
327+
328+
Permissions to access shared drives are tied to the credentials you provide
329+
here. If you run `docker` commands and tasks under a different username than the
330+
one used here to set up sharing, your containers will not have permissions to
331+
access the mounted volumes.
332+
333+
>**Tip:** In general, shared drives are only required for volume mounting [Linux
334+
containers](#switch-between-windows-and-linux-containers-beta-feature), and not
335+
for Windows containers. However, if the project lives outside of the `\Users`
336+
directory, you need to share the drive where the Dockerfile and volume are
337+
located even if you are using [Windows
338+
containers](#getting-started-with-windows-containers-beta-feature)). Runtime
339+
errors such as file not found or cannot start service may indicate shared drives
340+
are needed. (See also [Volume mounting requires shared drives for Linux containers and for any project directories outside of `C:\Users`](troubleshoot.md#volume-mounting-requires-shared-drives-for-linux-containers-and-for-any-project-directories-outside-of-cusers).)
341+
342+
See also [Verify domain user has permissions for shared
343+
drives](troubleshoot.md#verify-domain-user-has-permissions-for-shared-drives-volumes)
344+
in Troubleshooting.
331345

332346
#### Firewall rules for shared drives
333347

@@ -469,4 +483,4 @@ If you want to go back to using Docker Toolbox, you have to disable the Hyper-V
469483

470484
* Check out the <a href="https://blog.docker.com/2016/06/docker-mac-windows-public-beta/">blog posts</a> on Docker for Mac and Docker for Windows public betas, and <a href="https://blog.docker.com/2016/03/docker-for-mac-windows-beta/">earlier posts</a> on the initial private beta.
471485

472-
* Please give feedback on your experience with the app and report bugs and problems by logging into our [Docker for Windows forum](https://forums.docker.com/c/docker-for-windows).
486+
* Please give feedback on your experience with the app and report bugs and problems by logging into our [Docker for Windows forum](https://forums.docker.com/c/docker-for-windows).

‎docker-for-windows/troubleshoot.md

+53-12
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,89 @@ redirect_from:
66
title: Logs and troubleshooting
77
---
88

9-
Here is information about how to diagnose and troubleshoot problems, send logs and communicate with the Docker for Windows team, use our forums and Knowledge Hub, browse and log issues on GitHub, and find workarounds for known problems.
9+
Here is information about how to diagnose and troubleshoot problems, send logs
10+
and communicate with the Docker for Windows team, use our forums and Knowledge
11+
Hub, browse and log issues on GitHub, and find workarounds for known problems.
1012

1113
## Docker Knowledge Hub
1214

13-
**Looking for help with Docker for Windows?** Check out the [Docker Knowledge Hub](http://success.docker.com/) for knowledge base articles, FAQs, and technical support for various subscription levels.
15+
**Looking for help with Docker for Windows?** Check out the [Docker Knowledge
16+
**Hub](http://success.docker.com/) for knowledge base articles, FAQs, and
17+
**technical support for various subscription levels.
1418

1519
## Submitting diagnostics, feedback, and GitHub issues
1620

17-
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](index.md#diagnose-and-feedback) to learn about diagnostics and how to create new issues on GitHub.
21+
If you encounter problems for which you do not find solutions in this
22+
documentation, on [Docker for Windows issues on
23+
GitHub](https://github.com/docker/for-win/issues), or the [Docker for Windows
24+
forum](https://forums.docker.com/c/docker-for-windows), we can help you
25+
troubleshoot the log data. See [Diagnose and
26+
Feedback](index.md#diagnose-and-feedback) to learn about diagnostics and how to
27+
create new issues on GitHub.
1828

1929
## Checking the Logs
2030

2131
In addition to using the diagnose and feedback option to submit logs, you can browse the logs yourself.
2232

2333
### Use the systray menu to view logs
2434

25-
To view Docker for Windows latest log, click on the `Diagnose & Feedback` menu entry in the systray and then on the `Log file` link. You can see the full history of logs in your `AppData\Local` folder.
35+
To view Docker for Windows latest log, click on the `Diagnose & Feedback` menu
36+
entry in the systray and then on the `Log file` link. You can see the full
37+
history of logs in your `AppData\Local` folder.
2638

2739
### Use the systray menu to report and issue
2840

29-
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 will upload diagnostics to our server and provide you with a unique ID you can use in email or the forum to reference the upload.
41+
If you encounter an issue and the suggested troubleshoot procedures outlined
42+
below don't fix it you can generate a diagnostics report. Click on the `Diagnose &
43+
Feedback` menu entry in the systray and then on the `Upload diagnostic...` link.
44+
This will upload diagnostics to our server and provide you with a unique ID you
45+
can use in email or the forum to reference the upload.
3046

3147
## Troubleshooting
3248

3349
### inotify on shared drives does not work
3450

35-
Currently, `inotify` does not work on Docker for Windows. This will become evident, for example, when when an application needs to read/write to a container across a mounted drive. This is a known issue that the team is working on. Below is a temporary workaround, and a link to the issue.
51+
Currently, `inotify` does not work on Docker for Windows. This will become
52+
evident, for example, when when an application needs to read/write to a
53+
container across a mounted drive. This is a known issue that the team is working
54+
on. Below is a temporary workaround, and a link to the issue.
3655

37-
* **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)
56+
* **Workaround for nodemon and Node.js** - If you are using [nodemon](https://github.com/remy/nodemon) with `Node.js`, try the fallback
57+
polling mode described here: [nodemon isn't restarting node
58+
applications](https://github.com/remy/nodemon#application-isnt-restarting)
3859

3960
* **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)
4061

62+
### Volume mounting requires shared drives for Linux containers and for any project directories outside of `C:\Users`
63+
64+
If you are using mounted volumes and get runtime errors indicating an
65+
application file is not found, a volume mount is denied, or a service cannot
66+
start (e.g., with [Docker Compose](/compose/gettingstarted.md)), you might
67+
need to enable [shared drives](index.md#shared-drives).
68+
69+
Volume mounting requires shared drives for Windows containers, but also for
70+
Linux containers if the project lives outside of the `C:\Users` directory. Go to
71+
<img src="images/whale-x.png"> --> **Settings** --> **Shared Drives** and share
72+
the drive that contains the Dockerfile and volume.
4173

4274
### Verify domain user has permissions for shared drives (volumes)
4375

44-
>**Tip:** Shared drives are only required for volume mounting [Linux containers](index.md#switch-between-windows-and-linux-containers-beta-feature), not Windows containers.
76+
>**Tip:** Shared drives are only required for volume mounting [Linux
77+
containers](index.md#switch-between-windows-and-linux-containers-beta-feature),
78+
not Windows containers.
4579

46-
Permissions to access shared drives are tied to the username and password you use to set up shared drives. (See [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 will not have permissions to access the mounted volumes. The volumes will show as empty.
80+
Permissions to access shared drives are tied to the username and password you
81+
use to set up shared drives. (See [Shared Drives](index.md#shared-drives).) If
82+
you run `docker` commands and tasks under a different username than the one used
83+
to set up shared drives, your containers will not have permissions to access the
84+
mounted volumes. The volumes will show as empty.
4785

48-
The solution to this is to switch to the domain user account and reset credentials on shared drives.
86+
The solution to this is to switch to the domain user account and reset
87+
credentials on shared drives.
4988

50-
Here is an example of how to de-bug this problem, given a scenario where you shared the `C` drive as a local user instead of as the domain user. Assume the local user is `samstevens` and the domain user is `merlin`.
89+
Here is an example of how to de-bug this problem, given a scenario where you
90+
shared the `C` drive as a local user instead of as the domain user. Assume the
91+
local user is `samstevens` and the domain user is `merlin`.
5192

5293
1. Make sure you are logged in as the Windows domain user (for our example, `merlin`).
5394

@@ -327,4 +368,4 @@ relates to Docker: [Docker fails to start on Windows
327368
10](https://github.com/docker/for-win/issues/27).
328369

329370
For a temporary workaround, uninstall the firewall or anti-virus software, or explore other
330-
workarounds suggested on the forum.
371+
workarounds suggested on the forum.

0 commit comments

Comments
 (0)
Please sign in to comment.