mysql.yml
version: '3'
services:
mysql:
image: mysql
restart: always
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: "password"
volumes:
- /opt/docker/mysql:/var/lib/mysql
ports:
- 3306:3306
start : docker-compose -f mysql.yml up -d
stop : docker-compose -f mysql.yml down