-
Notifications
You must be signed in to change notification settings - Fork 250
/
Dockerfile
68 lines (45 loc) · 1.55 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
FROM python:3.10-slim-bookworm AS base
LABEL maintainer="mapproxy.org"
# The MAPPROXY_VERSION argument can be used like this to overwrite the default:
# docker build --build-arg MAPPROXY_VERSION=1.15.1 [--target base|development|nginx] -t mapproxy:1.15.1 .
ARG MAPPROXY_VERSION=1.16.0
RUN apt update && apt -y install --no-install-recommends \
python3-pil \
python3-yaml \
python3-pyproj \
libgeos-dev \
python3-lxml \
libgdal-dev \
python3-shapely \
libxml2-dev libxslt-dev && \
apt-get -y --purge autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN mkdir /mapproxy
WORKDIR /mapproxy
# fix potential issue finding correct shared library libproj (fixed in newer releases)
RUN ln -s /usr/lib/`uname -m`-linux-gnu/libproj.so /usr/lib/`uname -m`-linux-gnu/liblibproj.so
RUN pip install MapProxy==$MAPPROXY_VERSION && \
# temporary fix for v1.15.1
if [ "$MAPPROXY_VERSION" = '1.15.1' ]; then pip install six; fi && \
pip cache purge
COPY app.py .
COPY start.sh .
ENTRYPOINT ["bash", "-c", "./start.sh base"]
###### development image ######
FROM base AS development
EXPOSE 8080
ENTRYPOINT ["bash", "-c", "./start.sh development"]
##### nginx image ######
FROM base AS nginx
RUN apt update && apt -y install --no-install-recommends nginx gcc
# cleanup
RUN apt-get -y --purge autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip install uwsgi && \
pip cache purge
COPY uwsgi.conf .
COPY nginx-default.conf /etc/nginx/sites-enabled/default
EXPOSE 80
ENTRYPOINT ["bash", "-c", "./start.sh nginx"]