Cannot install packages inside docker Ubuntu image
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I installed Ubuntu 14.04 image on docker. After that, when I try to install packages inside the ubuntu image, I'm getting unable to locate package error: apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package curl How to fix this error? 回答1: It is because there is no package cache in the image, you need to run: apt-get -qq update before installing packages, and if your command is in a Dockerfile, you'll then need: apt-get -qq -y install curl 回答2: From the docs