forked from geopython/pygeoapi
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfileMobiitydb
54 lines (48 loc) · 1.5 KB
/
DockerfileMobiitydb
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
FROM postgis/postgis:17-3.5
# Configuration Parameters
LABEL maintainer="MobilityDB Project - https://github.com/MobilityDB/MobilityDB"
ENV MOBILITYDB_VERSION 1.2.0
ENV POSTGRES_DB=mobilitydb
ENV POSTGRES_USER=docker
ENV POSTGRES_PASSWORD=docker
# Fix the Release file expired problem
RUN echo "Acquire::Check-Valid-Until \"false\";\nAcquire::Check-Date \"false\";" | cat > /etc/apt/apt.conf.d/10no--check-valid-until
# Install Prerequisites
RUN apt-get update \
&& apt-get install -y \
build-essential \
cmake \
git \
libproj-dev \
g++ \
wget \
autoconf \
autotools-dev \
libgeos-dev \
libpq-dev \
libproj-dev \
libjson-c-dev \
protobuf-c-compiler \
xsltproc \
libgsl-dev \
libgslcblas0 \
postgresql-server-dev-${PG_MAJOR} \
&& rm -rf /var/lib/apt/lists/*
# Install MobilityDB
RUN wget -O MobilityDB.tar.gz "https://github.com/MobilityDB/MobilityDB/archive/v${MOBILITYDB_VERSION}.tar.gz" \
&& mkdir -p /usr/local/src/MobilityDB \
&& tar \
--extract \
--file MobilityDB.tar.gz \
--directory /usr/local/src/MobilityDB \
--strip-components 1 \
&& rm MobilityDB.tar.gz
RUN mkdir /usr/local/src/MobilityDB/build
RUN cd /usr/local/src/MobilityDB/build && \
cmake .. && \
make -j$(nproc) && \
make install
RUN rm /docker-entrypoint-initdb.d/10_postgis.sh
# Create mf-api table
COPY /docker/initdb-mobilitydb.sh /docker-entrypoint-initdb.d/
RUN chmod +x /docker-entrypoint-initdb.d/initdb-mobilitydb.sh