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

How to implement scheduled automatic backup of MySQL under CentOS7

The happiest thing that happens in a production e...

Example of how to enable Brotli compression algorithm for Nginx

Brotli is a new data format that can provide a co...

XHTML Web Page Tutorial

This article is mainly to let beginners understan...

Use nexus as a private library to proxy docker to upload and download images

1. Nexus configuration 1. Create a docker proxy U...

Docker installation steps for Redmine

Download the image (optional step, if omitted, it...

How to use MySQL 5.7 temporary tablespace to avoid pitfalls

Introduction MySQL 5.7 aims to be the most secure...

MySQL 5.7.18 release installation guide (including bin file version)

The installation process is basically the same as...

How to construct a table index in MySQL

Table of contents Supports multiple types of filt...

Implementation code for installing vsftpd in Ubuntu 18.04

Install vsftpd $ sudo apt-get install vsftpd -y S...

Docker's health detection mechanism

For containers, the simplest health check is the ...

Detailed explanation of the use of router-view components in Vue

When developing a Vue project, you often need to ...

Vue uses Canvas to generate random sized and non-overlapping circles

Table of contents Canvas related documents Effect...

Vue achieves seamless carousel effect (marquee)

This article example shares the specific code of ...

MySQL slow query operation example analysis [enable, test, confirm, etc.]

This article describes the MySQL slow query opera...

js to implement file upload style details

Table of contents 1. Overview 2. Parameters for c...