-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two commands with pwd
variable does not work for Windows users (PowerShell) in 06_bind_mounts.md
#17370
Comments
pwd
variable does not work for Windows users (PowerShell) in 06_bind_mounts.mdpwd
variable does not work for Windows users (PowerShell) in 06_bind_mounts.md
Thanks for sharing the issue. I'm trying to reproduce this error, and I can't do it with the current command. The only way I can reproduce it is by modifying the command as the following:
If possible, can you help share a screenshot like the above, so that we get more details. |
@craig-osterhout Hi! Sure! Issue is reproduced for modern PowerShell 7. I forgot to check in PowerShell 5.1 :) Yes, with 5.1 there is no this issue. BTW, my code for version 7 also works for 5.1 😀So, it's up to you which version you are targeting. But I think many users use PS7 already. At least, two of us :) -> https://forums.docker.com/t/error-in-poweshell-on-docker-run-it-mount-mount-type-bind-src-pwd/136051 |
Thank you @hotenov. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. /lifecycle locked |
Is this a docs issue?
Type of issue
Information is incorrect
Description
Current version of command does not work on Windows (PowerShell)
docker run -it --mount type=bind,src="$(pwd)",target=/src ubuntu bash
on page https://docs.docker.com/get-started/06_bind_mounts/#trying-out-bind-mounts
and this
in section https://docs.docker.com/get-started/06_bind_mounts/#run-your-app-in-a-development-container
error in PowerShell shell
Need to add caveat (note) for Windows users, that they should try this:
docker run -it --mount "type=bind,src=$pwd,target=/src" ubuntu bash
ATTENTION: This command does NOT work in bash shell (Linux).
Location
https://docs.docker.com/get-started/06_bind_mounts/#trying-out-bind-mounts
Suggestion
I opened the PR #17369 (by clicking "Edit this page" link)
but I was in a hurry 🤨and forgot about Linux users.
Then I noticed that there is a similar command below with separation onto Linux and Windows users. I copied this style for section above and also corrected the PowerShell command in the second place.
The text was updated successfully, but these errors were encountered: