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

JavaScript single thread and asynchronous details

Table of contents 1. Task Queue 2. To explain som...

The process of installing SVN on Ubuntu 16.04.5LTS

This article briefly introduces the process of se...

How to configure MGR single master and multiple slaves in MySQL 8.0.15

1. Introduction MySQL Group Replication (MGR for ...

Solution to uninstalling Python and yum in CentOs system

Background of the accident: A few days ago, due t...

Linux configuration SSH password-free login "ssh-keygen" basic usage

Table of contents 1 What is SSH 2 Configure SSH p...

CSS Skills Collection - Classics among Classics

Remove the dotted box on the link Copy code The co...

The perfect solution for Vue routing fallback (vue-route-manager)

Table of contents Routing Manager background gett...

This article takes you to explore NULL in MySQL

Table of contents Preface NULL in MySQL 2 NULL oc...

Steps to install MySQL using Docker under Linux

As a tester, you may often need to install some s...

How to delete extra kernels in Ubuntu

Step 1: View the current kernel rew $ uname -a Li...

MySql grouping and randomly getting one piece of data from each group

Idea: Just sort randomly first and then group. 1....

Native JS to implement the aircraft war game

This article example shares the specific code of ...