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).