Docker Community Forums

Share and learn in the Docker community.

Docker-compose logging and file rotation , why in /var/lib/docker/containers/$containerId only one file always?

docker

(Dalareq) #1

in docker-compose.yml i specified logging like this

services:
  some-service:
    image: some-service
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

But in /var/lib/docker/containers/$containerId i see only one .log file -why?
How to do the rotation?
Also - after rebuild/restart- how can i keep previous file logs?