Docker启动容器设置日志大小及数量


 description

启动mysql容器,设置日志大小最大为100m,数量为1

 command

docker run --log-opt max-size=100m --log-opt max-file=1 mysql

 parameter

run : 在新容器中运行命令
--log-opt : 日志配置

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.