Docker edit container source code
Access the Container as Root: You can start a shell session as the root user using the docker exec command with the -u flag:
docker ps
docker exec -it -u root <container_id> /bin/bash
Install vim: Once you are inside the container as the root user, you can install vim:
apt-get update
apt-get install -y vim
docker restart <container_id>
docker-compose up -d --remove-orphans