Héctor
Héctor

Reputation: 26044

Install vim in node Docker image

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

Upvotes: 13

Views: 13292

Answers (1)

L0j1k
L0j1k

Reputation: 12635

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

Upvotes: 27

Related Questions