【问题标题】:What does "RUN apk add --no-cache tree" mean in a DockerfileDockerfile 中的“RUN apk add --no-cache tree”是什么意思
【发布时间】:2021-02-28 14:28:06
【问题描述】:

我遇到了以下 Dockerfile。

FROM registry

# I am not clear what this is.
# I do not understand the following comment either.
# tree is helpful to peruse filesystem storage of images
RUN apk add --no-cache tree

对于apk add,我得到了以下三个so链接。

  1. How can I install Docker inside an alpine container?
  2. Running "apk add" command in a docker container with arguments [closed]
  3. rhat8 equivalent of "apk add --no-cache gcc musl-dev linux-headers"

第一个链接中的This answer 说“在 alpine 中运行 docker”

有人可以请教我。为什么要在 docker 容器中运行 docker?

这是什么apk add

【问题讨论】:

  • 有效问题。我不明白反对票。这个问答帮助我意识到 apk 是 alpine linux 的默认包管理器,它在 docker 基础层中大量使用。

标签: docker


【解决方案1】:

apk 是 alpine 中使用的包管理器。该命令会在镜像中安装tree 包。

【讨论】:

    猜你喜欢
    • 2018-08-07
    • 2018-08-13
    • 2011-05-01
    • 2013-09-10
    • 2016-04-24
    • 1970-01-01
    • 2018-12-03
    • 2018-10-08
    • 1970-01-01
    相关资源
    最近更新 更多