forked from umap-project/umap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
75 lines (53 loc) · 1.37 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM node:alpine AS vendors
RUN apk add git
WORKDIR /srv/umap
COPY package.json .
RUN npm install
COPY . .
RUN npm run vendors
# This part installs deps needed at runtime.
FROM python:3.11-slim as common
RUN apt-get update && \
apt-get install -y --no-install-recommends \
tini \
uwsgi \
sqlite3 \
libpq-dev \
gdal-bin \
&& \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# This part adds deps needed only at buildtime.
FROM common as build
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
binutils \
libproj-dev \
curl \
git \
gettext \
python3-venv \
libffi-dev \
libtiff5-dev \
libjpeg62-turbo-dev \
zlib1g-dev \
libfreetype6-dev \
liblcms2-dev \
libwebp-dev
RUN python -m venv /venv
WORKDIR /srv/umap
COPY . /srv/umap
RUN /venv/bin/pip install .[docker]
FROM common
COPY --from=build /srv/umap/docker/ /srv/umap/docker/
COPY --from=build /venv/ /venv/
COPY --from=vendors /srv/umap/umap/static/umap/vendors /srv/umap/umap/static/umap/vendors
WORKDIR /srv/umap
RUN mkdir -p /srv/umap/uploads
ENV PYTHONUNBUFFERED=1 \
PORT=8000
EXPOSE 8000
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/srv/umap/docker/entrypoint.sh"]