forked from pklaus/brother_ql_web
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (51 loc) · 1.22 KB
/
Dockerfile
File metadata and controls
58 lines (51 loc) · 1.22 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# syntax=docker/dockerfile:1.6
FROM --platform=$TARGETPLATFORM python:3-alpine
ARG TARGETARCH
WORKDIR /app
# First, copy only the requirements.txt
# This ensures the dependencies can be sourced from docker's cache (and save a
# lot of time during building) *unless* the requirements.txt file actually
# changes
COPY ./requirements.txt /app/requirements.txt
RUN if [ $TARGETARCH == "arm" ]; then \
apk update --no-cache && \
apk add --no-cache \
# Build dependencies for Pillow
gcc \
musl-dev \
zlib-dev \
jpeg-dev \
tiff-dev \
freetype-dev \
lcms2-dev \
libwebp-dev \
tcl-dev \
tk-dev \
harfbuzz-dev \
fribidi-dev \
libimagequant-dev \
libxcb-dev \
openjpeg-dev \
bash \
; fi
RUN apk update --no-cache && \
apk add --no-cache \
git \
ttf-dejavu \
ttf-liberation \
ttf-droid \
ttf-freefont \
font-terminus \
font-inconsolata \
font-dejavu \
font-noto \
poppler-utils \
bash && \
pip3 install -r requirements.txt
RUN if [ $TARGETARCH == "arm" ]; then \
# Clean up build dependencies to reduce image size
apk del gcc musl-dev \
; fi
COPY . /app
EXPOSE 8013
ENTRYPOINT ["python3", "run.py"]