Jump to content

understanding the docker .img file


smakovits

Recommended Posts

ok, so I finally went to unraid 6.  been running 5.x and a separate system with docker till now.  I managed to get things up and running with docker and unraid, but I want to understand the function of the .img file.  Since I had no experience with it before, I didnt need to know, but not that it is there, it has me curious.  What purpose does it serve when adding containers to unraid?  I went with the default 10GB, but saw others say they are near capacity, so that makes me wonder, what is happening to fill it up, etc.  Surely it is something stupid simple...

Link to comment

ok, so I finally went to unraid 6.  been running 5.x and a separate system with docker till now.  I managed to get things up and running with docker and unraid, but I want to understand the function of the .img file.  Since I had no experience with it before, I didnt need to know, but not that it is there, it has me curious.  What purpose does it serve when adding containers to unraid?  I went with the default 10GB, but saw others say they are near capacity, so that makes me wonder, what is happening to fill it up, etc.  Surely it is something stupid simple...

That is where the actual docker containers are stored. You can think of them as little virtual machines. The mapped volumes that you set up with each docker to store appdata and access unRAID data are not the actual container, just a sort of external storage for the container.

 

You can change the size after you have created it. Probably have to disable docker first before it will let you change it. I gave mine 20GB. I am only using about 8GB of that with about a dozen dockers installed (only have 5 that run all the time).

Link to comment

OK, so while it is a .img extension, it is actually a mounted disk in unraid, separate from the unraid shares and disks?

 

So when a container is downloaded and installed, the main files for it are here, in the img file.  Therefore, the amount of space used will be determined by the containers I run. 

Link to comment

How are you guys able to determine how much space you are actually using in the docker.img? Is that available from the GUI?

 

edit:

I think I found it under the Docker tab (Docker volume info). Mine says:

devid    1 size 10.00GiB used 6.04GiB path /dev/loop0

 

Seems like a lot to me, but I am running Emby so it's probably just artwork and metadata. Is there a way to tell how much space is used per container?

Link to comment

How are you guys able to determine how much space you are actually using in the docker.img? Is that available from the GUI?

 

edit:

I think I found it under the Docker tab (Docker volume info). Mine says:

devid    1 size 10.00GiB used 6.04GiB path /dev/loop0

 

Seems like a lot to me, but I am running Emby so it's probably just artwork and metadata. Is there a way to tell how much space is used per container?

 

I would have thought that Emby would store the artwork & media in the /mnt/cache/appdata mapped share or whatever you're using rather than in the docker.img

Link to comment

I also have my containers setup so there is absolutely no information saved inside the docker container, its all saved in external places done through mappings like /config or /logs or /downloads. Those fields are then mapped into subdirectories of /mnt/cache/appdata/container like /mnt/cache/appdata/nzbget/downloads

Link to comment

How are you guys able to determine how much space you are actually using in the docker.img? Is that available from the GUI?

 

edit:

I think I found it under the Docker tab (Docker volume info). Mine says:

devid    1 size 10.00GiB used 6.04GiB path /dev/loop0

 

Seems like a lot to me, but I am running Emby so it's probably just artwork and metadata. Is there a way to tell how much space is used per container?

 

I would have thought that Emby would store the artwork & media in the /mnt/cache/appdata mapped share or whatever you're using rather than in the docker.img

 

It likely does, but they likely didnt map it properly.

Link to comment

How are you guys able to determine how much space you are actually using in the docker.img? Is that available from the GUI?

 

edit:

I think I found it under the Docker tab (Docker volume info). Mine says:

devid    1 size 10.00GiB used 6.04GiB path /dev/loop0

 

Seems like a lot to me, but I am running Emby so it's probably just artwork and metadata. Is there a way to tell how much space is used per container?

 

I would have thought that Emby would store the artwork & media in the /mnt/cache/appdata mapped share or whatever you're using rather than in the docker.img

 

It likely does, but they likely didnt map it properly.

 

Possibly, but give the fella the benefit of the doubt and all that....  my post was a subtle hint  ;)

 

That's a useful command BRiT

 

I'm using 14GB out of 20GB with 4GB free, ?maths  :o

 

I have got 29 containers though  ;D

 

My name is CHBMB and I'm a dockeraholic...  ::)

Link to comment

I also have my containers setup so there is absolutely no information saved inside the docker container, its all saved in external places done through mappings like /config or /logs or /downloads. Those fields are then mapped into subdirectories of /mnt/cache/appdata/container like /mnt/cache/appdata/nzbget/downloads

 

yeah, basically you can add any mappings you like, via the template

 

 

and ports....

Link to comment

I would have thought that Emby would store the artwork & media in the /mnt/cache/appdata mapped share or whatever you're using rather than in the docker.img

I guess you are right. I have my mappings set for /config to be /mnt/user/appdata/emby and I can see the artwork/metadata by browsing to the appropriate folders.

 

df -h

Here's my output:

Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0       10G  1.5G  6.8G  19% /var/lib/docker

 

So that seems to suggest I have 1.5G used and 6.8G free which doesn't match the GUI. Now I am really confused. Is there a command I can use to see how much space just my Emby container is using? Pardon my inexperience with docker.

 

 

 

Link to comment

OK, so while it is a .img extension, it is actually a mounted disk in unraid, separate from the unraid shares and disks?

 

So when a container is downloaded and installed, the main files for it are here, in the img file.  Therefore, the amount of space used will be determined by the containers I run.

 

yes?

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...