Created
August 23, 2023 08:18
-
-
Save BroHui/ba7a718e6c3bc03237cd821f930a1b84 to your computer and use it in GitHub Desktop.
python3.11.4 with mysqlclient
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.11.4-slim-bullseye | |
ENV PYTHONUNBUFFERED 1 | |
RUN sed -i s@/deb.debian.org/@/mirrors.163.com/@g /etc/apt/sources.list \ | |
&& sed -i s@/security.debian.org/@/mirrors.163.com/@g /etc/apt/sources.list \ | |
&& apt-get clean | |
RUN apt-get update \ | |
&& apt-get install -y default-libmysqlclient-dev build-essential pkg-config | |
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/ \ | |
&& pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn | |
RUN pip install --no-cache-dir mysqlclient | |
CMD ["tail", "-f", "/dev/null"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment