how to set docker logs size


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


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


run : Run a command in a new container
--log-opt : Log driver options
Was this helpful?

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.