-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (26 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
37 lines (26 loc) · 1.02 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
FROM python:3.11.14
ENV DEBIAN_FRONTEND=noninteractive
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1
ENV PYCAN_DIR=/var/www/pycan
ENV PYTHONPATH=/var/www/pycan
ENV PYTHONDONTWRITEBYTECODE=1
ENV VIRTUAL_ENV=/opt/venv
EXPOSE 8000
WORKDIR $PYCAN_DIR
RUN apt-get update || :
RUN apt-get install --no-install-recommends -y postgresql-client
RUN apt-get install --no-install-recommends -y ca-certificates
RUN apt-get install --no-install-recommends -y libpq-dev
RUN apt-get install --no-install-recommends -y binutils
RUN apt-get install --no-install-recommends -y libproj-dev
RUN apt-get install --no-install-recommends -y gdal-bin
RUN rm -rf /var/lib/apt/lists/*
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY requirements.txt requirements-dev.txt ./
RUN pip install --upgrade pip && \
pip install -r requirements.txt && \
pip install -r requirements-dev.txt
# Fix an ipython bug: https://github.com/ipython/ipython/issues/12677
RUN pip install jedi==0.17.2
CMD ["./manage.py", "runserver", "0.0.0.0:8000"]