I try the following Dockerfile:
# syntax=docker/dockerfile:1
FROM python:3.11-slim-bullseye
EXPOSE 80
WORKDIR /app
RUN apt-get update && apt-get install -y
RUN apt install gcc libmariadb3 libmariadb-dev libmariadb-dev-compat -y
RUN pip install --upgrade pip
RUN pip install Flask Flask-SQLAlchemy flask-marshmallow marshmallow-sqlalchemy
RUN pip install mariadb==1.0.0
COPY ./back .
CMD [ "python3", "app.py"]
I get this error:
MariaDB Connector/Python requires MariaDB Connector/C >= 3.2.4, found version 3.1.16
And when I try with mariadb==1.0.0 I get this error:
MariaDB Connector/Python requires MariaDB Connector/C >= 3.1.3, found version 3.1.16
I see the answer to this post Installing MariaDB in Dockercontainer - requires MariaDB Connector/C >= 3.2.4, found version 3.1.16 but doesn't work