# get list of container id
docker ps
# launch bash into container
# prefix with winpty if no terminal available (Windows)
winpty docker exec -it <id> bash
# Install an editor
apt-get update
apt-get install nano
From https://blog.softwaremill.com/editing-files-in-a-docker-container-f36d76b9613c