Skip to content

Conversation

@craig-osterhout
Copy link
Contributor

@craig-osterhout craig-osterhout commented Oct 16, 2024

Description

Created new tab and added powershell-specific command.

The original command works for me using the default Windows 10/11 version of powershell.
It did fail once, but I wasn't able to reliably reproduce.

https://deploy-preview-21139--docsdocker.netlify.app/get-started/workshop/06_bind_mounts/#trying-out-bind-mounts

Related issues or tickets

Hotjar-9181
https://forums.docker.com/t/error-in-poweshell-on-docker-run-it-mount-mount-type-bind-src-pwd/136051

Reviews

  • Editorial review

Signed-off-by: Craig <craig.osterhout@docker.com>
@craig-osterhout craig-osterhout requested a review from a team October 16, 2024 18:29
@github-actions github-actions bot added the area/get-started Relates to get started and onboarding docs label Oct 16, 2024
@netlify
Copy link

netlify bot commented Oct 16, 2024

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 7156265
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/67100619bc02000008e6d32b
😎 Deploy Preview https://deploy-preview-21139--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

{{< tab name="PowerShell" >}}

```console
$ docker run -it --mount "type=bind,src=$($pwd),target=/src" ubuntu bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would interpolating the uppercase ${PWD} variable work as a cross-platform alternative to $(pwd)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker run -it --mount type=bind,src="${PWD}",target=/src ubuntu bash and docker run -it --mount "type=bind,src=${PWD},target=/src" ubuntu bash both also work for me in PowerShell.

I'm not able to reliably reproduce the original issue, so saying it works on my machine doesn't give me much confidence.

@craig-osterhout craig-osterhout merged commit b0c0082 into docker:main Oct 16, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/get-started Relates to get started and onboarding docs status/review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants