Docker Compose and MySQL
Learn how to launch multiple containers using Compose.
We'll cover the following
Launch multiple containers with Docker Compose
Starting Docker containers individually is not fun, especially when commands are long and difficult to remember. Fortunately, Docker Compose provides a way to build and launch containers, networks, and volumes from a single configuration file named docker-compose.yml
.
YAML is a cheeky mnemonic for YAML Ain’t Markup Language, a common, compact data format often used for configuration purposes. It uses new lines and tab stops rather than the quotes and brackets favored by JSON.
Docker Compose offers many configuration options, but an example is the best way to illustrate common settings. Let’s consider following docker-compose.yml
:
Get hands-on with 1400+ tech skills courses.