Docker Container Size
Im running the latest immich release on an unraid instance with lots of hdd space. unRaid stores docker containers in a docker.img file and there are settings to limit it to a specific size (20gb). When running Immich, that image grows in size very quickly. Im running a scan on an external library with a lot of image (like 2-400k) and it would seem that those containers arent configured to store information externally. Are there env vars that i can set to map whatever is taking up all the space in that image to some other location?
those container sizes are after just running for an hr.
compose and env files are default.
15 Replies
1.8 GB looks correct
it doesn't store media directly on the container, it stored on
upload_location
your specified in .env
file
if it stores in your container, it will be far more greater than 1.8GByep i am following there. i wonder if there is a way to mount the machine learning models elsewhere so that it isnt included in the container?
ah, the volume in the machine-learning-models is mounted through the model-cache volume in the docker-compose file
btw, thanks for the quick reply. kickass app.
I believe you can map that to an external drive, but how to do it, you might need to search for google

perfect. I'll give that a try to alleviate some of the storage space.
what are those two other volumes? would it be beneficial to map those as well?
pgdata is postgres by the looks. i think im going to try and map both of those to see if i can save some space in that container.
If you map pgdata you might lose data in the database because it doesn’t know where the data is
Unless you can also copy the data over to the new location, easier prob to just do a backup just in case
im cool with that. i just started a scan and can always start from scratch.
i ended up just commenting out the root volumes and mapping them in each container. i couldnt figure out how the convention should be. tried:
and
neither worked. the second said it needed to be a map, so i tried and object (first one) but that said name was not a valid prop. looked through the docker docs on how to do it but couldnt find anythign specific so i just went the explicit route in the containers volume mapping.
if anyone knows how to mount those volumes properly to an external location that'd be great. i did see there is an
external: true
flag but didnt try that.
wow, thanks @ddshd . that is much more involved than i had expected.
You might just be able to change the mount under the db container itself and it would be a one line change but I don’t have the compose in front of me to say for sure
You just need to add driver, driver_opts and the sub values under pgdata
FWIW, the size of the model cache will never reach 20GB
This is the production model-cache size

correct. i am just trying to limit the size where i can. i think i have some other offending containers that seem to want to grow that docker.img in size as well. just started with immich first. many thinaks.
yup thats what i did. much easier for me at this point.