docker-compose 常见配置参数
docker-compose 编撰规范:https://docs.docker.com/compose/compose-file/
cpus 已经弃用
mem_limit 已经弃用
1、限制系统资源
文档地址:https://docs.docker.com/compose/compose-file/deploy/#cpus
deploy:
resources:
limits:
cpus: '1.00'
memory: 2G
pids: 1
reservations:
cpus: '0.25'
memory: 20M
2、容器重启策略
restart: on-failure:3
**** 好看的皮囊千篇一律,有趣的灵魂万里挑一 **** 好评点赞 !!!!!!!!!!!!!!!!!!!!!!!!!!!