在高山码头安装软件包

如何编写 Dockerfile 命令来安装下面的 Alpine docker 镜像文件:

  1. 软件属性公用软件
  2. Openjdk-8-jdk
  3. 蟒蛇3
  4. 谢谢
  5. 酒瓶
114644 次浏览

The equivalent of apt or apt-get in Alpine is apk

A typical Dockerfile will contain, for example:

RUN apk add --no-cache wget

--no-cache is the equivalent to: apk add wget && rm -rf /var/cache/apk/*

or, before the --no-cache option was available:

RUN apk update && apk add wget

Alpine rm -rf /var/cache/apk/* has the Debian equivalent rm -rf /var/lib/apt/lists/*.

See the Alpine comparison with other distros for more details.