[英]Install packages in Alpine docker
How do I write Dockerfile commands to install the following in alpine docker image:如何编写 Dockerfile 命令以在 alpine docker 映像中安装以下内容:
The equivalent of apt
or apt-get
in Alpine is apk
Alpine 中
apt
或apt-get
的等价物是apk
A typical Dockerfile will contain, for example:一个典型的 Dockerfile 将包含,例如:
RUN apk add --no-cache wget
--no-cache
is the equivalent to:apk add wget && rm -rf /var/cache/apk/*
--no-cache
相当于:apk add wget && rm -rf /var/cache/apk/*
or, before the --no-cache option was available:或者,在 --no-cache 选项可用之前:
RUN apk update && apk add wget
Alpine rm -rf /var/cache/apk/*
has the Debian equivalent rm -rf /var/lib/apt/lists/*
. Alpine
rm -rf /var/cache/apk/*
与 Debian 等效rm -rf /var/lib/apt/lists/*
。
See theAlpine comparison with other distros for more details.有关更多详细信息,请参阅Alpine 与其他发行版的比较。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.