Brief introduction:
Docker can run a configured server on a single command, which is handy.
But there is also a problem is that when the parameters are more, the mapping directory is more, map port more ...
I used to write a script, start with a foot, very low ah.
Also see some of the Docker Image introduction page has introduced Docker-compose, but because has been a small application, also did not seriously look at this thing, today, learn a bit.
Docker compose is a Docker tool for defining and running complex applications
The data structure inside is much clearer than a few lines of my script. And you can start multiple containers at the same time, and they are started on a dependency basis.
For example, start the database first, and then start the blog.
One: Installation
Similar to installing Docker.
Installing Docker is DNF install Docker
Installing Docker-compose is DNF install Docker-compose
DNF is the package management tool that I use for fedora, depending on your Linux version, it may be different.
Two: simple example 1. No brain trial 2.3.4.5.6.
Three:
Docker-compose Docker Boot Tool