dockerbtrfs

How to browse the contents of a docker/btrfs container-specific layer


I have read, and I believe understood, the docker pages on using btrfs, and notably this one

My question is rather simple, I would need to be able to navigate (e.g. using cd and ls, but any other means is fine) in what the above link calls the Thin R/W layer attached to a given container.

The reason I need this is, I use an image that I have not built myself - namely jupyter/scipy-notebook:latest - and what I can see is that each container starts with a circa 100-200 Mb impact on overall disk usage, even though nothing much should be going on in the container.

So I suspect some rather verbose logs get created that I need to silent down a bit; however the whole union fs is huge - circa 5Gb large - so it would help me greatly to navigate only the data that is specific to one container so I can pinpoint the problem.


Solution

  • To list the files that are changed/stored since the original image use

    docker diff my-container
    

    This is quite handy if you want to get an idea of what's happening inside, doesn't give you the file sizes though.