Skip to content

Commit 1c04111

Browse files
author
Sofus Albertsen
committed
UPDATE multi-container examples as they were outdated.
1 parent 277c74e commit 1c04111

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

labs/09-multi-container.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ The `services` part is equivalent to our `docker container run` command. Likewis
217217

218218
Let's look the mysql_container part together, making you able to create the other container yourself. Look at the original command we made to spin up the container:
219219

220-
`docker container run --name mysql-container --rm -p 3306:3306 -e MYSQL_ROOT_PASSWORD=wordpress -d mysql`
220+
`docker container run --name mysql-container --rm -p 3306:3306 -e MYSQL_ROOT_PASSWORD=wordpress -e MYSQL_DATABASE=wordpressdb -d mysql:5.7.36`
221221

222-
The command gives out following information: a `name`, a `port` mapping, an `environment` variable and the `image` we want to run.
222+
The command gives out following information: a `name`, a `port` mapping, two `environment` variables and the `image` we want to run.
223223

224224
Now look at the docker-compose example again:
225225

@@ -256,7 +256,7 @@ To shut down the container and network, issue a `docker-compose down`
256256
You now have all the pieces of information to make the Wordpress container. We've copied the run command from before if you can't remember it by heart:
257257

258258
```bash
259-
docker container run --name wordpress-container --rm --network if_wordpress -e WORDPRESS_DB_HOST=mysql-container -e WORDPRESS_DB_PASSWORD=wordpress -p 8080:80 -d wordpress:5.7.2-apache`
259+
docker run --name wordpress-container --rm --network if_wordpress -e WORDPRESS_DB_HOST=mysql-container -e WORDPRESS_DB_PASSWORD=wordpress -e WORDPRESS_DB_USER=root -e WORDPRESS_DB_NAME=wordpressdb -p 8080:80 -d wordpress:5.7.2-apache
260260
```
261261

262262
You must

0 commit comments

Comments
 (0)