matplotlib이 종속성에 포함되는 파이썬 프로젝트를 배포할 때,
이미지를 빌드하는 과정에서 matplotlib을 설치할 때 에러가 많이 난다.
python setup.py bdist_wheel did not run successfully.
이런 에러가 많이 나는데, 다음과 같이 Dockerfile을 수정하면 해결할 수 있다.
FROM python:3.6-alpine
RUN apk add g++ jpeg-dev zlib-dev libjpeg make
RUN pip3 install matplotlib
우분투 이미지를 사용할 경우 아래와 같은 코드로 해결할 수 있다.
FROM ubuntu:20.10
RUN apt-get update && apt-get install -y python3 python3-pip
RUN pip3 install matplotlib