Unable to install vim or nano inside docker container

Here is how you can use wget to fetch and installnano and then use it in to edit a file in the python:latest docker image.

cd ~

wget http://www.nano-editor.org/dist/v2.4/nano-2.4.2.tar.gz

tar -xzf nano-2.4.2.tar.gz

cd nano-2.4.2

 ./configure

make

make install  # removed sudo from this line

Now test it:

touch file

nano file

# close with `ctrl+z enter`
rm file # delete that test file

UPDATE: apt-get worked for me... I bet other people weren't running update first.

apt-get update

apt-get install nano

First I create the docker:

sudo docker run -t -i ubuntu /bin/bash

Instead of this you can enter in a running docker with his number or name:

sudo docker exec -it be8aa338d656 bash

Then inside the docker run this code:

apt-get update
apt-get install vim nano