-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
46 lines (35 loc) · 1.17 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
FROM node:16-slim AS bundler
# install JS dependencies
COPY package.json package.json
COPY esbuild.js esbuild.js
COPY client-src/ client-src/
RUN npm install
RUN mkdir -p /sketch_map_tool/static/bundles
RUN npm run build
FROM ubuntu:24.04
RUN apt update \
&& apt install -y --no-upgrade \
python3 \
python3-pip \
python3-gdal \
git \
libgdal-dev \
libpq-dev \
libzbar0 \
libfreetype6-dev \
&& rm -rf /var/lib/apt/lists/*
ENV POETRY_NO_INTERACTION=1 \
POETRY_REQUESTS_TIMEOUT=600
COPY pyproject.toml poetry.lock .
RUN python3 -m pip install --break-system-packages poetry setuptools \
&& python3 -m poetry install --only main --no-root --no-directory
COPY sketch_map_tool sketch_map_tool
COPY data data
COPY config config
RUN python3 -m poetry install --only main --no-root --no-directory \
&& python3 -m poetry run python -m pip install \
gdal[numpy]=="$(gdal-config --version).*" \
psycopg2 \
&& python3 -m poetry run pybabel compile -d sketch_map_tool/translations
COPY --from=bundler --chown=smt:smt /sketch_map_tool/static/bundles sketch_map_tool/static/bundles
# use entry-points defined in docker-compose file