-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
36 lines (28 loc) · 937 Bytes
/
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
FROM python:3.9-bookworm
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8
RUN apt-get update -qq && apt-get -y upgrade && apt-get install -y -qq \
# std libs
git less nano curl \
ca-certificates \
wget build-essential\
# python basic libs
gettext \
# geodjango
gdal-bin binutils libproj-dev libgdal-dev \
# postgresql
libpq-dev postgresql-client && \
apt-get clean all && rm -rf /var/apt/lists/* && rm -rf /var/cache/apt/*
RUN mkdir -p /code/src
RUN useradd -ms /bin/bash django
RUN chown -R django:django /code
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
USER django
RUN python3.9 -m venv /code/venv
RUN /code/venv/bin/pip install --no-cache-dir pip setuptools wheel -U
COPY . /code/src
WORKDIR /code/src
# Install dev requirements
RUN /code/venv/bin/pip3 install --no-cache-dir -e .[dev] -U
ENTRYPOINT ["/bin/sh", "-e", "/usr/local/bin/entrypoint.sh"]