1. Create a custom network
LNMP the Create Network Docker # Create a custom network Docker Network LS # View
2. Create mysql database container
RUN -itd --name lnmp_mysql Docker \
- Net LNMP -p 3306: 3306-Vol --mount src = MySQL, dst = / var / lib / MySQL \ # here to automatically create volumes
-e MYSQL_ROOT_PASSWORD = 123456 mysql - = SET-Server-Character UTF8 # configuration information