When I write a docker-compose file I can insert a logging section like so:
logging:
options:
max-size: 10m
max-file: "3"
How can I congfigure my GenericContainer to have a logging driver configuration like above?
I ask because with Spring Boot's new testcontainer support it is very easy to load up infra components in containers (Kafka e.g.) for a local dev env. Leaving these infra containers on overnight has left me with a full up hard drive. Stopping the running JVM reaps the containers and gets the space back but I would like to know if there is a known way to configure as above.
Apparently you can achieve this using the 'create container cmd modifier':
This should work for a GenericContainer as well -
withCreateContainerCmdModifieris a method from that class.