Add "Unix/Windows" support for shell command

This commit is contained in:
Ariel Safari 2020-08-01 22:34:45 +03:00 committed by GitHub
parent 0aef9f63ef
commit b072d99385
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,7 @@ And now, we'll start migrating a service at a time into the compose file.
To remember, this was the command we were using to define our app container.
=== "Unix"
```bash
docker run -dp 3000:3000 \
-w /app -v "$(pwd):/app" \
@ -63,7 +64,7 @@ docker run -dp 3000:3000 \
sh -c "yarn install && yarn run dev"
```
If you are using PowerShell then use this command.
=== "Windows"
```powershell
docker run -dp 3000:3000 `
@ -161,6 +162,8 @@ docker run -dp 3000:3000 `
Now, it's time to define the MySQL service. The command that we used for that container was the following:
=== "Unix"
```bash
docker run -d \
--network todo-app --network-alias mysql \
@ -170,7 +173,7 @@ docker run -d \
mysql:5.7
```
If you are using PowerShell then use this command.
=== "Windows"
```powershell
docker run -d `