-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (39 loc) · 1.28 KB
/
Dockerfile
File metadata and controls
50 lines (39 loc) · 1.28 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
FROM python:3.8-bullseye AS base
LABEL maintainer="Deep Dev dev@thedeep.io"
ENV PYTHONUNBUFFERED 1
WORKDIR /code
# Copy dependency files
COPY pyproject.toml poetry.lock /code/
# Install required system dependencies
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
iproute2 git vim \
gcc libc-dev libproj-dev \
wait-for-it binutils gdal-bin \
libcairo2 \
libpango1.0-dev \
libpangocairo-1.0-0 \
fonts-dejavu-core \
fonts-liberation \
&& pip install --upgrade --no-cache-dir pip poetry \
&& poetry config virtualenvs.create false \
&& poetry install --no-root \
&& apt-get remove -y gcc libc-dev libproj-dev \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# Verify installation
RUN pip install weasyprint==53.0
# -------------------------- WEB ---------------------------------------
FROM base AS web
# Copy all project files
COPY . /code/
# -------------------------- WORKER ---------------------------------------
FROM base AS worker
# Additional worker-specific tools
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
libreoffice \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# Copy all project files
COPY . /code/