-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (26 loc) · 821 Bytes
/
Dockerfile
File metadata and controls
31 lines (26 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Base image for Python 3.x app with the following libraries and PyPI packages (that take quite a long time to compile):
# * gevent
# * cffi
# * MySQL connector for mysqlclient
# * regex
# * rccsmin
# https://hub.docker.com/_/python
FROM python:3.14.3-alpine
COPY requirements.txt /tmp/requirements.txt
# https://github.com/gliderlabs/docker-alpine/issues/181#issuecomment-444857401
RUN apk update &&\
apk add --no-cache mariadb-connector-c-dev &&\
apk add --no-cache --virtual .build-deps \
build-base \
gcc \
git \
libffi-dev \
mariadb-dev &&\
pip install --upgrade pip && pip install -r /tmp/requirements.txt \
&&\
apk del .build-deps &&\
rm -rf /root/* /tmp/*
# tag an image
ARG GITHUB_SHA
ENV GITHUB_SHA=${GITHUB_SHA}
RUN python -V; pip list; env