This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
53 lines (46 loc) · 1.48 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
50
51
52
53
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.8.3
RUN apt-get -y update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing \
--no-install-recommends \
build-essential \
gettext \
python3-pip \
libcairo2-dev \
poppler-utils \
python3-dev \
python3-setuptools \
python3-wheel \
python3-cffi \
libcairo2 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libgdk-pixbuf2.0-0 \
libffi-dev \
shared-mime-info \
tzdata \
&& ln -fs /usr/share/zoneinfo/Europe/Zurich /etc/localtime \
&& dpkg-reconfigure -f noninteractive tzdata
# Update C env vars so compiler can find gdal
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal
ENV PYTHONUNBUFFERED 1
ARG ENV
# Copy files in another location to solved windows rights issues
# These files are only used during build process and by entrypoint.sh for dev
WORKDIR /code
COPY requirements_dev.txt requirements_dev.txt
COPY requirements.txt requirements.txt
RUN if [ "$ENV" = "DEV" ] ; \
then \
echo "Installing development dependencies..." \
&& pip3 install -r requirements_dev.txt \
&& echo "########################################" \
&& echo "# Installed development dependencies #" \
&& echo "########################################"; \
else \
pip3 install -r requirements.txt \
&& echo "########################################" \
&& echo "# Installed production dependencies #" \
&& echo "########################################"; \
fi
COPY . /code/