How to solve the problem that Docker container has no vim command

How to solve the problem that Docker container has no vim command

Find the problem

Today, when I tried to modify the files in the Docker container, I found that there was no vim command in the container, and it returned:

vim my.cnf
bash: vim: command not found

This article will record how to solve this problem.

Solution

Still inside the docker container, first run the following command and wait patiently for a while:

apt-get update

Once completed run:

apt-get install vim

After the installation is complete, run the following command to verify whether the installation is successful:

vim

If an interface similar to the following is returned, it proves that vim has been successfully installed:

VIM installation successfully returns

Summarize

This is the end of this article about solving the problem of no vim command in Docker container. For more related content about no vim command in Docker container, please search previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Solution to installing vim in docker container
  • Solve the problem that vim commands cannot be used in Docker containers

<<:  This article teaches you how to import CSS like JS modules

>>:  Mysql query database capacity method steps

Recommend

Solution to the cross-domain problem of SpringBoot and Vue interaction

Table of contents Browser Same Origin Policy 1. V...

Encoding problems and solutions when mysql associates two tables

When Mysql associates two tables, an error messag...

Detailed explanation of Vue development Sort component code

Table of contents <template> <ul class=&...

How to install php7 + nginx environment under centos6.6

This article describes how to install php7 + ngin...

Tips and precautions for using MySQL index

1. The role of index In general application syste...

How to use CSS attribute value regular matching selector (tips)

There are three types of attribute value regular ...

Service management of source package installation under Linux

Table of contents 1. Startup management of source...

How to insert weather forecast into your website

We hope to insert the weather forecast into the w...

Steps to build a file server using Apache under Linux

1. About the file server In a project, if you wan...

Practice of Vue global custom instruction Modal drag

Table of contents background Implementation ideas...

How to implement communication between Docker containers

Scenario: A laradock development environment (php...

Why does using limit in MySQL affect performance?

First, let me explain the version of MySQL: mysql...