Javier
Javier

Reputation: 921

Why docker disk space is growing without control?

When I boot my docker-compose up -d it takes very little disk space.

But during weeks, I am loosing space in my server.

I don't try any other images, so the problem isn't dead containers or images.

Once I boot docker-compose up -d, I don't touch that server.

P.D: I know how to free space using docker system prune and what I want to know is why the space is leaking.

Upvotes: 2

Views: 156

Answers (1)

Javier
Javier

Reputation: 921

I have seen a possible solution.

I am trying it now.

Inside the services I have put the following options:

myservice:
  logging:
    driver: local
    options:
      max-size: "100m"

Perhaps the docker logs are the culprit of the lose of space.

I have seen that the default driver is json-file, and it uses more space than local.

Also json-file has no max size by default.

To be sure I have used max-size to limit each log.

Upvotes: 2

Related Questions