dokploy icon indicating copy to clipboard operation
dokploy copied to clipboard

Docker cleanup is not doing what it's supposed to

Open fir4tozden opened this issue 3 months ago • 2 comments

To Reproduce

Create MongoDB service and delete it. But this problem is not specific to this.

Current vs. Expected behavior

Deleting the service leaves the image and volume in Docker. This is normal. However, we expect the Web Server > Space: Clean All operation to delete these unused images and volumes. However, this operation leaves these unused images and volumes in Docker. If we manually perform this operation with sudo docker system prune -af and sudo docker volume prune -af, we will see that they are deleted. These will probably remain there without being cleaned even when the Daily Docker Cleanup setting is turned on.

Even when we update Dokploy, the old Dokploy image remains. This means an extra +3 GB of storage with each update.

Cleanups are important. In fact, it's recommended that the Daily Docker Cleanup setting be enabled by default. That is, if these cleaning issues are resolved.

Provide environment information

Ubuntu 24.04 LTS

Which area(s) are affected? (Select all that apply)

Application, Databases, Docker Compose, Docker

Are you deploying the applications where Dokploy is installed or on a remote server?

Same server where Dokploy is installed

Additional context

No response

Will you send a PR to fix it?

No

fir4tozden avatar Nov 14 '25 21:11 fir4tozden

This problem exists, and often it is indeed necessary to manually run docker image prune -a to free up a significant amount of space.

Hoshino-Yumetsuki avatar Nov 25 '25 10:11 Hoshino-Yumetsuki

This problem exists, and often it is indeed necessary to manually run docker image prune -a to free up a significant amount of space.

Hello. There is a pull request for this. https://github.com/Dokploy/dokploy/pull/3064

If you want to tackle this issue yourself, you can create a schedule. It's easy!

👉 https://keift.gitbook.io/blog/linux/install-dokploy#recommended-docker-cleanup-schedule

fir4tozden avatar Nov 26 '25 20:11 fir4tozden