首页 > 解决方案 > Dockerfile 中的“RUN apk add --no-cache tree”是什么意思

问题描述

我遇到了以下 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我得到了以下三个链接。

  1. 如何在高山容器中安装 Docker?
  2. 在带有参数的docker容器中运行“apk add”命令[关闭]
  3. rhat8 相当于“apk add --no-cache gcc musl-dev linux-headers”

第一个链接的这个答案说“在高山运行 docker”

有人可以启发我。为什么我们要在 docker 容器中运行 docker?

这是什么apk add

标签: docker

解决方案


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


推荐阅读