Skip to content

docker

Edit a file on a docker swarm volume

Editing a file stored on a container volume in production is a very bad idea. You should not do it and pass all configuration through your container orchestrator. Using a single node Docker Swarm for test purposes, it can be a huge time saver though. Here’s how to do it. Ensure that your DOCKER_HOST environment is set such that running docker volume ls will show the volume storing the file you want to edit (let’s call this volume myvol).

Docker Swarm in 2022

Going with Docker Swarm in 2022 TL;DR: Docker Swarm is probably good enough in a lot of cases. See the update for 2023 Having worked professionally on setting up, customising and deploying Kubernetes (but without pretending to be a specialist), I didn’t want to go down that path for my personal infrastructure, even if using Jsonnet was of great help (see my Jsonnet course here). I tried Nomad which worked fine, but getting it to do what I wanted was taking more time than I hoped.