Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install vim commands in a docker container

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article shows you how to install the vim command in the docker container, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

How to install the vim command in a docker container?

The vim tool is usually installed on linux systems. Vim is usually installed using apt-get, as an example if the system is debian.

First enter the docker container (provided that the container has been started):

Docker exec-it mysql bash # mysql is the name of the container, change it to your own

Next, update the source of apt-get. Copy and glue all the following commands to the console of the container to execute:

Mv / etc/apt/sources.list / etc/apt/sources.list.bak & &\ echo "deb http://mirrors.163.com/debian/ jessie main non-free contrib" > / etc/apt/sources.list & &\ echo "deb http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" > > / etc/apt/sources.list & &\ echo "deb-src http://mirrors.163.com/debian/ jessie main non-free contrib "> > / etc/apt/sources.list & &\ echo" deb-src http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib "> > / etc/apt/sources.list

Now you can install the software:

Apt-get update & & apt-get install vim-y

Wait patiently for the order to be carried out.

If prompted that vim cannot be found, you need to update apt-get

$apt-get update

Then execute the install

$apt-get install vim

The above is how to install the vim command in the docker container. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report