My Dockerfile:
FROM python:3.8-alpine
...
RUN apk add --no-cache --virtual .build-deps gcc libffi-dev openssl-dev musl-dev mariadb-dev \
&& pip install --no-cache-dir -r /code/requirements/production.txt \
&& apk del .build-deps gcc libffi-dev musl-dev openssl-dev mariadb-dev
...
Requirements:
django==2.2.9
mysqlclient==1.4.6
gunicorn==20.0.4
django-bootstrap3==12.0.3
django-fsm==2.7.0
djangorestframework==3.11.0
When I run the application I get this from django:
ImportError: Error loading shared library libmariadb.so.3: No such file or directory (needed by /usr/local/lib/python3.8/site-packages/MySQLdb/_mysql.cpython-38-x86_64-linux-gnu.so)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
How can I fix this as I have already installed the MySQL db adapter recommeneded?