Skip to content

Instantly share code, notes, and snippets.

@sleepless-se
Created November 10, 2021 11:04
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 sleepless-se/fb07d421cbe4ab5c3f60722a7628aed4 to your computer and use it in GitHub Desktop.
Save sleepless-se/fb07d421cbe4ab5c3f60722a7628aed4 to your computer and use it in GitHub Desktop.
Fix mysqlclient install error in Python.
FROM python:3.8-slim-buster
RUN apt upgrade && apt update && apt-get -y install gcc libmariadb-dev # <-- this is effective line!
WORKDIR /app
ENV LANG=ja_JP.utf8
ENV LC_ALL=ja_JP.utf8
ENV TZ="Asia/Tokyo"
COPY . .
RUN pip3 install -r requirements.txt
EXPOSE 80
CMD [ "python", "main.py" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment