Unable to install vim or nano inside docker container

后端 未结 6 2033
失恋的感觉
失恋的感觉 2021-02-01 03:11

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 an

6条回答
  •  灰色年华
    2021-02-01 03:40

    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
    

提交回复
热议问题