Show multiline PowerShell commands

Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
This commit is contained in:
Stefan Scherer
2020-07-15 08:04:40 +02:00
parent 3641a64e81
commit f77065be98
3 changed files with 64 additions and 5 deletions

View File

@@ -36,7 +36,7 @@ So, let's do it!
1. Make sure you don't have any previous `getting-started` containers running.
1. Run the following command (replace the ` \ ` characters with `` ` `` in Windows PowerShell). We'll explain what's going on afterwards:
1. Run the following command. We'll explain what's going on afterwards:
```bash
docker run -dp 3000:3000 \
@@ -45,6 +45,15 @@ So, let's do it!
sh -c "yarn install && yarn run dev"
```
If you are using PowerShell then use this command.
```powershell
docker run -dp 3000:3000 `
-w /app -v ${PWD}:/app `
node:12-alpine `
sh -c "yarn install && yarn run dev"
```
- `-dp 3000:3000` - same as before. Run in detached (background) mode and create a port mapping
- `-w /app` - sets the "working directory" or the current directory that the command will run from
- `-v ${PWD}:/app` - bind mount the current directory from the host in the container into the `/app` directory