how to set docker logs size


 description

Start the mysql container, set the maximum log size to 100m and the number to 1

 command

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

 parameter

run : Run a command in a new container
--log-opt : Log driver options

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.