-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
35 lines (21 loc) · 994 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
FROM python:3.11.4-bullseye as builder
LABEL maintainer="NSGI <[email protected]>"
COPY . /src
# ignore pip warning about running pip as root - since we are in a containerized sandboxed environment anyways...
ENV ENV PIP_ROOT_USER_ACTION=ignore
WORKDIR /src
RUN pip install --upgrade setuptools && \
pip install --upgrade pip && \
pip install --upgrade build && \
python -m build
WORKDIR /tifs
RUN curl -o nl_nsgi_nlgeo2018.tif https://cdn.proj.org/nl_nsgi_nlgeo2018.tif && \
curl -o nl_nsgi_rdcorr2018.tif https://cdn.proj.org/nl_nsgi_rdcorr2018.tif && \
curl -o nl_nsgi_rdtrans2018.tif https://cdn.proj.org/nl_nsgi_rdtrans2018.tif
FROM python:3.11.4-slim-bullseye as runner
ENV ENV PIP_ROOT_USER_ACTION=ignore
COPY --from=builder /src/dist/coordinate_transformation_api-2*.whl .
RUN pip install coordinate_transformation_api-2*.whl
COPY --from=builder /tifs/* /usr/local/lib/python3.11/site-packages/pyproj/proj_dir/share/proj
EXPOSE 8000
ENTRYPOINT [ "ct-api" ]