-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
49 lines (37 loc) · 1.31 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM python:3.8-slim-buster as base
LABEL maintainer="Deep Dev [email protected]"
ENV PYTHONUNBUFFERED 1
WORKDIR /code
COPY pyproject.toml poetry.lock /code/
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
# Basic Packages
iproute2 git vim \
# Build required packages
gcc libc-dev libproj-dev \
# NOTE: procps: For pkill command
procps \
# Deep Required Packages
wait-for-it binutils gdal-bin \
# Upgrade pip and install python packages for code
&& pip install --upgrade --no-cache-dir pip poetry \
&& poetry --version \
# Configure to use system instead of virtualenvs
&& poetry config virtualenvs.create false \
&& poetry install --no-root \
# Clean-up
&& pip uninstall -y poetry virtualenv-clone virtualenv \
&& apt-get remove -y gcc libc-dev libproj-dev \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# -------------------------- WEB ---------------------------------------
FROM base AS web
COPY . /code/
# -------------------------- WORKER ---------------------------------------
FROM base AS worker
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
libreoffice \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
COPY . /code/