build mysql dependencies in Dockerfile
This commit is contained in:
parent
b76a488537
commit
2b698d2921
10
Dockerfile
10
Dockerfile
|
|
@ -4,13 +4,19 @@ EXPOSE 8042
|
|||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apk add --no-cache \
|
||||
python3 \
|
||||
py3-gunicorn
|
||||
python3 \
|
||||
py3-gunicorn
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip3 install --upgrade pip && \
|
||||
pip3 install --no-cache-dir -r requirements.txt
|
||||
|
||||
# For production: build mysql dependencies
|
||||
RUN apk add --virtual build-deps gcc python3-dev musl-dev && \
|
||||
apk add --no-cache mariadb-dev && \
|
||||
pip3 install --no-cache-dir mysqlclient && \
|
||||
apk del build-deps
|
||||
|
||||
COPY . .
|
||||
|
||||
# TODO #1: build a real production setup with gunicorn, nginx for static files etc.
|
||||
|
|
|
|||
Loading…
Reference in New Issue