最佳答案
我想为 SOLR 扩展一个码头集装箱。我只是想把 vim
安装进去。但是当我运行 docker build 时,它会抱怨我不是 root 用户。
这是我正在扩展的 DockerFile: Https://github.com/makuk66/docker-solr/blob/master/5.3/dockerfile
我的构建文件是这样的:
FROM makuk66/docker-solr
MAINTAINER OCSCommerce Team <support@ocscommerce.com>
RUN apt-get update
RUN apt-get --assume-yes install vim
COPY home/ocscommerce /etc/solr/home
然后输出如下结果:
192.168.99.100
localhost:solr$ docker build -t ocscommerce/solr .
Sending build context to Docker daemon 39.66 MB
Step 0 : FROM makuk66/docker-solr
---> 92be2fe79f15
Step 1 : MAINTAINER OCSCommerce Team <support@ocscommerce.com>
---> Using cache
---> a3ac70e40324
Step 2 : RUN apt-get update
---> Running in c865716a2694
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
有没有办法把软件包安装到这个容器里?或者我需要从 makuk66复制原始的构建文件?