Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any text editor inside docker container?

I have run 3 docker containers on one server.One - with nginx, two - with node apps.I can enter inside nginx container using exec command, but I want to look through the hosts file in etc. Is there any ability to do this?

Update There is only cat util. You can call it as cat your_filename

like image 938
Nikita Lyashenko Avatar asked Oct 25 '25 15:10

Nikita Lyashenko


1 Answers

The node images do not have these utilities, in order to keep them lightweight for production environments.

Once you've gotten into the container (with docker exec -it (containerName) bash) you can install nano using apt-get update followed by apt-get install nano.

like image 70
Gregory Avatar answered Oct 27 '25 04:10

Gregory