I have a system build with a docker compose that creates different containers, and one of this runs the posgresql alpine db. The problem i’m facing right now is that the container with the db cannot start because, from the logs, it seems that there’s no space left.
I’d like to make space without destroying and rebuilding the containers, instead i wanted to inspect what’s inside the db to manually remove the unused data.
Is there a way to do so?
It depends on how you use Docker. Do you have Docker Engine or Docker Desktop? In this case I am almost sure you have Docker Engine as Docker Desktop would have different error I think.
You can use this command to get the path of the folder of the container:
Then you can go to that folder and read the files if you want to, but I normally would not write anything in the docker data root directly.
Did you store data on the container’s filesystem? You should always use a volume. or mount the files from the host.
You should check what you can remove from the docker data root that you don’t actually need. You could have left-over volumes, docker images, build cache.