Skip to content

Instantly share code, notes, and snippets.

@BroHui
Created August 23, 2023 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BroHui/ba7a718e6c3bc03237cd821f930a1b84 to your computer and use it in GitHub Desktop.
Save BroHui/ba7a718e6c3bc03237cd821f930a1b84 to your computer and use it in GitHub Desktop.
python3.11.4 with mysqlclient
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