-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathDockerfile
More file actions
65 lines (57 loc) · 2 KB
/
Dockerfile
File metadata and controls
65 lines (57 loc) · 2 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
59
60
61
62
63
64
65
# syntax=docker/dockerfile:1
FROM python:3.10-bookworm
# Declare architecture argument
ARG TARGETARCH
# Install dependencies
RUN apt-get update && apt-get install -y \
libxml2-dev \
libxmlsec1-dev \
libxmlsec1-openssl \
net-tools \
ffmpeg \
software-properties-common \
fontconfig \
libxrender1 \
libxext6 \
wget \
xfonts-base \
xfonts-75dpi \
fonts-lato \
fonts-noto-core \
fonts-roboto \
fonts-open-sans \
cabextract \
xfonts-utils && \
mkdir -p /usr/share/fonts/truetype/msttcore && \
cd /usr/share/fonts/truetype/msttcore && \
wget https://downloads.sourceforge.net/corefonts/arial32.exe && \
cabextract -F '*.ttf' arial32.exe && \
fc-cache -fv && \
rm arial32.exe && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install libssl1.1 dynamically based on architecture
RUN if [ "$TARGETARCH" = "arm64" ]; then \
wget http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_arm64.deb; \
else \
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb; \
fi && \
dpkg -i libssl1.1_1.1.0g-2ubuntu4_*.deb && \
rm libssl1.1_1.1.0g-2ubuntu4_*.deb
# Install wkhtmltopdf dynamically based on architecture
RUN if [ "$TARGETARCH" = "arm64" ]; then \
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_arm64.deb; \
else \
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb; \
fi && \
dpkg -i wkhtmltox_0.12.6-1.buster_*.deb && \
apt-get install -f -y && \
rm wkhtmltox_0.12.6-1.buster_*.deb
WORKDIR /zango
# Install Python dependencies
RUN pip install --upgrade 'sentry-sdk[django]'
COPY backend/requirements/base.txt /backend/requirements/base.txt
RUN pip install -r /backend/requirements/base.txt
# Copy backend and install
COPY backend /zango/backend
RUN cd backend && pip install . && cd .. && rm -rf backend