Using DockerSpawner and --log-opt or --log-driver

Hello. My containers are eating up my disk space when I spawn them with DockerSpawner. I am trying to convince DockerSpawner to start them with either --log-driver local or --log-opt maxsize=250m. I can’t figure out how to do that from DockerSpawner and I am wondering if anyone has ever managed to do this?

DockerSpawner has an extra_host_config parameter
that’s passed to the underlying docker-py library:
https://docker-py.readthedocs.io/en/stable/api.html#docker.api.container.ContainerApiMixin.create_host_config
You should be able to configure the logging here.