Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

file deduplication in docker?

How can i make sure 10 docker containers use deduplication on storage level?
I dont want to use 10 times the storage when i install 1 application in all 10 docker instances.

Comments

  • Any thoughts on my 3.4GB docker images? Thanks.

    Thanked by 1oloke
  • so if you pull the images with the binaries already installed then it will be deduplicated. so the installation of binaries after pulling, is not as effictient as it creates different copies as the metadata timestamps is not persee the same.

  • rm_rm_ IPv6 Advocate, Veteran
    edited December 2025

    If you store it on a filesystem supporting reflinks and copy on write, then you can just use a program like jdupes in crontab to deduplicate it from time to time.

    Such filesystems are Btrfs and XFS. Also ZFS, but that's so much more involved to get into.

    Thanked by 1dbadude
  • @dbadude You nailed it. if you run the install command inside the running container, it writes to the unique writable layer of each instance, so you end up using 10x the storage.
    The cleanest fix is to just build a custom image (Dockerfile) with the app pre-installed. Docker automatically shares the read-only layers, so 10 containers will still only take up the space of 1 image.
    If you can't rebuild the image for some reason, you could just bind mount the application folder from the host into all the containers so they share the same physical files. Way easier than messing with ZFS or filesystem dedupe!

    Thanked by 1dbadude
Sign In or Register to comment.