I was using the following dockerfile to build a nginx docker image with some additional modules:
FROM nginx:mainline-alpine
RUN apk update
RUN apk add nginx-extras libnginx-mod-http-dav-ext libnginx-mod-http-auth-pam
This was successful in the past. But when I try to rebuild the image now I get this error:
=> [internal] load metadata for docker.io/library/nginx:mainline-alpine 0.0s
=> [1/3] FROM docker.io/library/nginx:mainline-alpine 0.0s
=> CACHED [2/3] RUN apk update 0.0s
=> ERROR [3/3] RUN apk add nginx-extras libnginx-mod-http-dav-ext libnginx-mod-http-auth-pam 0.7s
------
> [3/3] RUN apk add nginx-extras libnginx-mod-http-dav-ext libnginx-mod-http-auth-pam:
#0 0.632 ERROR: unable to select packages:
#0 0.633 libnginx-mod-http-auth-pam (no such package):
#0 0.680 required by: world[libnginx-mod-http-auth-pam]
#0 0.680 libnginx-mod-http-dav-ext (no such package):
#0 0.680 required by: world[libnginx-mod-http-dav-ext]
#0 0.680 nginx-extras (no such package):
#0 0.680 required by: world[nginx-extras]
I can’t find any hint what has changed.
Is there another proper way to create a nginx docker container with additional modules installed?
2
Answers
Try using Debian-based image?
In alpine
libnginx-mod-http-dav-ext
callsnginx-mod-http-dav-ext
(link), but I can’t find the same package forlibnginx-mod-http-auth-pam
. You can build or build it from sources.Alternative to it: use debian based images instead of alpine. Something like this: