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

Comments

Popular posts from this blog

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

Reduce (shrink) and resize raw disk at Proxmox

Apache 2.4 + mod_wsgi + Python 3.7 + Django installation on Centos 7.10