I'm trying to install vim in my image. I'm using node
as base image:
FROM node
RUN apt-get update & apt-get install vim
//more things...
I get this error:
E: Unable to locate package vim
It's almost certain that the Linux distribution you are running in a Docker container doesn't have Vim or any other text editor installed by default. And then use the package manager of the distribution to install it. It should allow you to run and use Vim in the currently running container.
You are only using a single ampersand (&
) in your RUN
directive, which runs a command in the background in bash. Change it to include two ampersands (&&
). Please also notice the -y
(automatic yes to prompts) I have added to the apt-get
statement, without which your docker build
command will fail:
RUN apt-get update && apt-get install -y vim
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With