-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
27 lines (22 loc) · 876 Bytes
/
Dockerfile
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
# define what image we're starting from.
FROM python:3.9-slim
# Set pip config
ENV PIP_NO_CACHE_DIR=false
# Create the working directory
WORKDIR /bot
# Install project dependencies
# - first build tools, because pillow-simd isn't pre-compiled
RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
python3-dev python3-setuptools libtiff5-dev libjpeg-dev libopenjp2-7-dev \
zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev \
python3-tk libharfbuzz-dev libfribidi-dev libxcb1-dev
RUN pip install -U pillow-simd
# - then normal stuff
COPY requirements.txt ./
RUN pip install -U -r requirements.txt
# Copy the source code across last to optimize image rebuilds on code changes
# (skips all above steps if we need to redo)
COPY . .
# Define the command to run when the container starts
ENTRYPOINT ["python"]
CMD ["-m", "dreaf"]