docker

Move Docker Volumes using rsync

I’m running a Docker host on a Hetzner Cloud server. Since my GitLab instance grew quite big, I bought some additional storage that’s mounted to the machine as a additional device. All my Docker stuff uses local volumes located in /var/lib/docker/volumes. The question now was: How to move those volumes to the new storage? Docker volumes are basically just subdirectories in a special folder. For some applications it’s important to copy over all the extended attributes and other metadata like permissions, ownership and change dates.

Docker: MongoDB connection slow

I’m working on an application where I use Docker and docker-compose to orchestrate a NodeJS container running my backend and a MongoDB container for my database. Using Docker for Mac, I’ve seen drastic slowdowns when initially establishing the database connection. When I used a Linux host, everything was extremely smooth. Since Docker for Mac creates a xhyve-based virtual machine running a Linux with the Docker daemon inside, I initially thought that this is just the usual slow in-VM performance compared to running Docker natively on the host system.