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-suexechostlprtime

Alpine 有一些不同于主要 Linux 操作系统的包结构:

  • apache2-suexecapache2 包的一部分;
  • hostbind-tools 包的一部分;
  • lprcups-client 包的一部分;
  • time 已经在 alpine 图像中。它使用 busyboxtime 实用程序。

所以,最后的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