I'm sure this was working a few weeks ago. I can no longer install matplotlib on an Alpine base image. A cut down version of my Dockerfile is:
FROM python:3-alpine
RUN apk add --no-cache --virtual .build-deps \
zlib-dev jpeg-dev musl-dev linux-headers build-base g++ python3-dev py3-setuptools libffi-dev cmd:pip3 \
&& pip3 install --no-cache-dir \
matplotlib mplfinance
The build hangs on
...
(53/55) Installing py3-toml (0.10.2-r0)
(54/55) Installing py3-pip (20.3.4-r0)
(55/55) Installing .build-deps (20210525.060427)
Executing busybox-1.32.1-r6.trigger
OK: 318 MiB in 91 packages
Collecting matplotlib
Downloading matplotlib-3.4.2.tar.gz (37.3 MB) **<- This never completes**
And never downloads the package
The equivalent slim base image works fine
FROM python:3-slim
RUN pip3 install matplotlib
No issues with slim
The exact same behaviour happens when I try the build on Google Cloud Build
gcloud builds submit . --tag=$GCR_TAG
I have tried various combinations of leaving off the --no-cache and --no-cache-dir but it makes no difference