Alpine 不可满足的约束:缺少包
Alpine unsatisfiable constraints: missing packages
我正在尝试创建一个基于 alpine:3.7
的 docker 图像,但是我在使用 apk add
.
安装一些软件包时遇到错误
示例:
ERROR: unsatisfiable constraints:
apache2-suexec (missing):
required by: world[apache2-suexec-custom]
host (missing):
required by: world[host]
lpr (missing):
required by: world[lpr]
time (missing):
required by: world[time]
原因是这些包还不存在于 alpine 存储库中。我该如何解决这些问题?有没有我可以下载它们的存储库?
我正在使用这条线路
FROM alpine:3.7
RUN apk update \
&& apk upgrade \
&& apk --no-cache add --update tcl apache2 apache2-suexec ca-certificates \
apk-tools curl build-base supervisor lpr time dcron host rsync libxml2-utils libxslt
您遇到以下包的问题:apache2-suexec
、host
、lpr
和 time
。
Alpine 有一些不同于主要 Linux 操作系统的包结构:
apache2-suexec
是 apache2
包的一部分;
host
是 bind-tools
包的一部分;
lpr
是 cups-client
包的一部分;
time
已经在 alpine 图像中。它使用 busybox
的 time
实用程序。
所以,最后的Dockerfile
是:
FROM alpine:3.7
RUN apk update \
&& apk upgrade \
&& apk --no-cache add --update tcl apache2 ca-certificates \
apk-tools curl build-base supervisor cups-client dcron bind-tools rsync libxml2-utils libxslt
我正在尝试创建一个基于 alpine:3.7
的 docker 图像,但是我在使用 apk add
.
示例:
ERROR: unsatisfiable constraints:
apache2-suexec (missing):
required by: world[apache2-suexec-custom]
host (missing):
required by: world[host]
lpr (missing):
required by: world[lpr]
time (missing):
required by: world[time]
原因是这些包还不存在于 alpine 存储库中。我该如何解决这些问题?有没有我可以下载它们的存储库?
我正在使用这条线路
FROM alpine:3.7
RUN apk update \
&& apk upgrade \
&& apk --no-cache add --update tcl apache2 apache2-suexec ca-certificates \
apk-tools curl build-base supervisor lpr time dcron host rsync libxml2-utils libxslt
您遇到以下包的问题:apache2-suexec
、host
、lpr
和 time
。
Alpine 有一些不同于主要 Linux 操作系统的包结构:
apache2-suexec
是apache2
包的一部分;host
是bind-tools
包的一部分;lpr
是cups-client
包的一部分;time
已经在 alpine 图像中。它使用busybox
的time
实用程序。
所以,最后的Dockerfile
是:
FROM alpine:3.7
RUN apk update \
&& apk upgrade \
&& apk --no-cache add --update tcl apache2 ca-certificates \
apk-tools curl build-base supervisor cups-client dcron bind-tools rsync libxml2-utils libxslt