OmG
OmG

Reputation: 18838

How to install a package using apt-get in ubuntu container inside Docker

I have installed docker on windows 10. After that, pull the ubuntu container. After running the container with this docker run -t -i --privileged ubuntu bash or docker run -it ubuntu command, I've get this root@7f72926f3608:/# in console.

Then, try to install the python package using apt-get like $sudo apt-get install python or apt-get install python, but I've gotten the following error in console:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python

Hence, the question is how can I install a package in ubuntu container inside docker?

Upvotes: 3

Views: 10622

Answers (1)

vegiops
vegiops

Reputation: 311

Run apt-get update and then install packages.

Upvotes: 13

Related Questions