From d4d21dbda85fe55b888fdc58ffd32ead51354da8 Mon Sep 17 00:00:00 2001 From: artem Date: Fri, 19 May 2023 20:27:33 +0300 Subject: [PATCH] Need to correct commands for Windows users (PowerShell) in 06_bind_mounts.md (#17369) * Correct quoting in PowerShell command in 06_bind_mounts.md * Add and correct commands that use pwd variable for Windows users --- get-started/06_bind_mounts.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/get-started/06_bind_mounts.md b/get-started/06_bind_mounts.md index fdbfdd14b8..215ab9a954 100644 --- a/get-started/06_bind_mounts.md +++ b/get-started/06_bind_mounts.md @@ -50,10 +50,18 @@ command prompt (`cmd`). 2. Run the following command to start `bash` in an `ubuntu` container with a bind mount. + If you are using an Mac or Linux device, then use the following command. + ```console $ docker run -it --mount type=bind,src="$(pwd)",target=/src ubuntu bash ``` + If you are using Windows, then use the following command in PowerShell. + + ```powershell + $ docker run -it --mount "type=bind,src=$pwd,target=/src" ubuntu bash + ``` + The `--mount` option tells Docker to create a bind mount, where `src` is the current working directory on your host machine (`getting-started/app`), and `target` is where that directory should appear inside the container (`/src`). @@ -138,7 +146,7 @@ So, let's do it! ```powershell $ docker run -dp 3000:3000 ` - -w /app --mount type=bind,src="$(pwd)",target=/app ` + -w /app --mount "type=bind,src=$pwd,target=/app" ` node:18-alpine ` sh -c "yarn install && yarn run dev" ```