5

I am trying to create a docker image based on alpine:3.7, but I get errors while installing some packages with apk add.

Example:

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]

The cause is that these packages do not exist in alpine repositories yet. How can I solve these issues? Is there any repository from which I can download them?

I'm using this line

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
jcpaiva
  • 422
  • 1
  • 6
  • 14

1 Answers1

6

You have an issue with the following packages: apache2-suexec, host, lpr and time.

Alpine has some other package structure than main Linux OSs:

  • apache2-suexec is a part of apache2 package;
  • host is a part of bind-tools package;
  • lpr is a part of cups-client package;
  • time is already in alpine image. It uses busybox's time utility.

So, the final Dockerfile is:

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
nickgryg
  • 25,567
  • 5
  • 77
  • 79