Docker – Modify files in a running container

Here is a solution to use a fully functioning text editor within a docker container when ssh’d into a remote linux host.

# Log on to your container
docker exec -it grave_ride /bin/bash

# Run this command to fix the terminal
export TERM=xterm

# Continue to open and edit your file in your faviourite text editor.
nano my-file.js

Leave a Reply

Your email address will not be published. Required fields are marked *