相关文章推荐

docker构建错误(未安装apt-utils,无法删除‘/var/lib/apt/list’:目录不为空)

内容来源于 Stack Overflow,遵循 CC BY-SA 4.0 许可协议进行翻译与使用。IT领域专用引擎提供翻译支持

腾讯云小微IT领域专用引擎提供翻译支持

原文
Stack Overflow用户 提问于2017-02-10

我正在尝试使用以下命令构建一个码头映像

docker build -t blog .

以及Dockerfile:

FROM ruby:2.4
RUN apt-get update -yqq \
    && apt-get install -yqq --no-install-recommends \
      postgresql-client \
      && rm -rf /var/lib/apt/lists
WORKDIR /usr/src/app
COPY Gemfile* .
RUN bundle install
COPY . .
EXPOSE 3000
CMD rails server -b 0.0.0.0

我得到的结果如下:

Step 1 : FROM ruby:2.4
 ---> ef296fcb8c7c
Step 2 : RUN apt-get update -yqq     && apt-get install -yqq --no-install-recommends       postgresql-client       && rm -rf /var/lib/apt/lists
 ---> Running in 18bfd303925d
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package postgresql-client-common.
(Reading database ... 21168 files and directories currently installed.)
Preparing to unpack .../postgresql-client-common_165+deb8u2_all.deb ...
Unpacking postgresql-client-common (165+deb8u2) ...
Selecting previously unselected package postgresql-client-9.4.
Preparing to unpack .../postgresql-client-9.4_9.4.10-0+deb8u1_amd64.deb ...
Unpacking postgresql-client-9.4 (9.4.10-0+deb8u1) ...
Selecting previously unselected package postgresql-client.
Preparing to unpack .../postgresql-client_9.4+165+deb8u2_all.deb ...
Unpacking postgresql-client (9.4+165+deb8u2) ...
Setting up postgresql-client-common (165+deb8u2) ...
Setting up postgresql-client-9.4 (9.4.10-0+deb8u1) ...
 
推荐文章