How to Edit a File in a docker container with no Text Editor

 Simply editing a file is an ordeal if you don’t have vim, vi or nano available.

One of the best things to do may be to copy the file from the container to your host machine:

docker cp <container>:/path/to/file.ext .

Edit the file.

Then send it back to the container.

docker cp file.ext <container>:/path/to/file.ext


Popular posts from this blog

Securing the Pi-hole with fail2ban to prevent DNS Amplification attacks

How to clean DB from old logs in Magento 1.x

Python pxssh failed on login. could not set shell prompt