Trying to install inside a docker, either vim or nano but I only get this:
0% [Connecting to archive.ubuntu.com (91.189.88.152)]
Exit docker and do ping archive.ubuntu.com
and I get reply, do the same time inside docker it does not respond.
What could be the problem?
The SSH method works fine for Docker containers, too. That said, you can SSH into a Docker container using Docker's built-in docker exec . If you do not need an interactive shell, you can also use the docker attach command to connect the host's stdin and stdout to the running container and execute remote commands.
Yes, we can run docker in docker, we'll need to attach the unix socket /var/run/docker. sock on which the docker daemon listens by default as volume to the parent docker using -v /var/run/docker. sock:/var/run/docker.
It's almost certain that the Linux distribution you are running in a Docker container doesn't have Vim or any other text editor installed by default. And then use the package manager of the distribution to install it. It should allow you to run and use Vim in the currently running container.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With