Add "Unix/Windows" support for shell command
This commit is contained in:
parent
0aef9f63ef
commit
b072d99385
@ -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.
|
To remember, this was the command we were using to define our app container.
|
||||||
|
|
||||||
|
=== "Unix"
|
||||||
```bash
|
```bash
|
||||||
docker run -dp 3000:3000 \
|
docker run -dp 3000:3000 \
|
||||||
-w /app -v "$(pwd):/app" \
|
-w /app -v "$(pwd):/app" \
|
||||||
@ -63,7 +64,7 @@ docker run -dp 3000:3000 \
|
|||||||
sh -c "yarn install && yarn run dev"
|
sh -c "yarn install && yarn run dev"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are using PowerShell then use this command.
|
=== "Windows"
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
docker run -dp 3000:3000 `
|
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:
|
Now, it's time to define the MySQL service. The command that we used for that container was the following:
|
||||||
|
|
||||||
|
=== "Unix"
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -d \
|
docker run -d \
|
||||||
--network todo-app --network-alias mysql \
|
--network todo-app --network-alias mysql \
|
||||||
@ -170,7 +173,7 @@ docker run -d \
|
|||||||
mysql:5.7
|
mysql:5.7
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are using PowerShell then use this command.
|
=== "Windows"
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
docker run -d `
|
docker run -d `
|
||||||
|
Loading…
Reference in New Issue
Block a user