#Docker Container Size

1 messages · Page 1 of 1 (latest)

vivid glade
#

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?

Name                                            Container                Writable                 Log
immich_machine_learning                         1.84 GB                  102 MB                   27.3 kB
homeassistant                                   1.83 GB                  2.10 MB                  27.4 MB
immich_microservices                            1.80 GB                  34.8 MB                  436 kB
immich_server                                   1.80 GB                  34.8 MB                  48.1 kB
frigate                                         1.73 GB                  316 kB                   219 kB

those container sizes are after just running for an hr.
compose and env files are default.

wise vault
#

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.8GB

vivid glade
#

yep 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?

wise vault
#

ah, the volume in the machine-learning-models is mounted through the model-cache volume in the docker-compose file

vivid glade
#

btw, thanks for the quick reply. kickass app.

wise vault
#

I believe you can map that to an external drive, but how to do it, you might need to search for google

vivid glade
#

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.

inland eagle
#

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

vivid glade
#

im cool with that. i just started a scan and can always start from scratch.

vivid glade
#

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:

volumes:
  pgdata:
    name: "/path/to/local/volume"

and

volumes:
  pgdata: "/path/to/local/volume"

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.

inland eagle
vivid glade
#

wow, thanks @inland eagle . that is much more involved than i had expected.

inland eagle
#

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

inland eagle
wise vault
#

This is the production model-cache size

vivid glade
#

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.