Update 07_multi_container.md (#14234)

* Update 07_multi_container.md

Add a script that works on M1 chips for people following this guide on Apple Silicon.

* Add shell prompt, use linux/amd64

Co-authored-by: Stefan Scherer <stefan.scherer@docker.com>
This commit is contained in:
Bart Duisters 2022-04-04 14:45:40 +02:00 committed by GitHub
parent 807c6009a0
commit a4de787aed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -53,6 +53,18 @@ For now, we will create the network first and attach the MySQL container at star
-e MYSQL_DATABASE=todos \
mysql:5.7
```
If you are using an ARM based chip, e.g. Macbook M1 Chips / Apple Silicon, then use this command.
```console
$ docker run -d \
--network todo-app --network-alias mysql \
--platform "linux/amd64" \
-v todo-mysql-data:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=secret \
-e MYSQL_DATABASE=todos \
mysql:5.7
```
If you are using PowerShell then use this command.