🔗 Move Docker volume to bind mount →

A great how-to on moving from a Docker volume to a bind mount.

That being said, I don't necessarily agree with their benefits breakdowns for each? For example, as a benefit of using Docker volumes, they say:

Persistence: Even if the Docker container is deleted, the volume persists, which is crucial for non-temporary data.

For reasons listed in my previous post about Docker volumes, I actually find that as a negative. I greatly prefer unsurprising and in-plain-view locations1 of my container data. Also, you know what else will persist data if a container is deleted? A frickin' bind mount! And I usually keep mine in the same directory as the docker-compose.yml.2

But I successfully, easily migrated a Postgres data volume to a bind mount3, and I'm going to bookmark it (via this blog post) and archive it in several places so I'll always have it.

That's how nice it is.


  1. An unfair set of adjectives, perhaps, but I'm sticking with 'em!

  2. I can definitely see me having a different opinion if I had to do enterprise things with Docker containers, and that's almost certainly what volumes are for. But that still doesn't explain why quite a few software projects aimed at self-hosters keep using volume mounts over bind mounts.

  3. For a project that quickly switched from "Let's just try it out" to "This is now essential, and I need to back it up."