How to edit a file dynamically in a running docker container
Background I had build a npm server(sinopia) docker image( https://github.com/feuyeux/docker-atue/blob/master/docker-images/feuyeux_sinopia.md ), and in the CMD line, it will run the start.sh every time when the container is generated. CMD ["/opt/sinopia/start.sh"] This shell will create a yaml file dynamically. sed -e 's/\#listen\: localhost/listen\: 0.0.0.0/' -e 's/allow_publish\: admin/allow_publish\: all/' /tmp/config.yaml > /opt/sinopia/config.yaml Question I wish I could edit this config.yaml when the container is running, because I hope the content should be changed on demand. see the