Alpine 不可满足的约束:缺少包

jcp*_*iva 4 docker alpine-linux

我正在尝试创建基于 的 docker 映像alpine:3.7,但是在使用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]
Run Code Online (Sandbox Code Playgroud)

原因是这些包在 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
Run Code Online (Sandbox Code Playgroud)

Nic*_*lay 6

您有以下软件包的一个问题:apache2-suexechostlprtime

除了主要的 Linux 操作系统之外,Alpine 还有一些其他的包结构:

  • apache2-suexecapache2包的一部分;
  • hostbind-tools包的一部分;
  • lprcups-client包的一部分;
  • time已经在高山图像中。它使用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
Run Code Online (Sandbox Code Playgroud)