docker-compose 文件
安装
curl -L https://get.daocloud.io/docker/compose/releases/download/v2.4.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose version
新建文件夹
编写docker-compose.yaml 文件,如下
services: mysql-compose: image: mysql environment: MYSQL_ROOT_PASSWORD: xxxxx ports: - 3306:3306 mem_limit: 900M cpus: 0.3
docker-compose up -d 后台启动