-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.postgres
More file actions
83 lines (71 loc) · 2.51 KB
/
Copy pathDockerfile.postgres
File metadata and controls
83 lines (71 loc) · 2.51 KB
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
76
77
78
79
80
81
82
83
ARG PG_MAJOR=16
FROM --platform=linux/amd64 postgis/postgis:$PG_MAJOR-master
ARG PG_MAJOR
RUN apt-get update && \
apt-mark hold locales && \
apt-get install -y --no-install-recommends \
git cmake flex bison build-essential ca-certificates postgresql-plpython3-$PG_MAJOR postgresql-server-dev-$PG_MAJOR \
libboost-graph-dev \
libboost-atomic1.74.0 \
libboost-chrono1.74.0 \
libboost-graph1.74.0 \
libboost-date-time1.74.0 \
libboost-program-options1.74.0 \
libboost-system1.74.0 \
libboost-thread1.74.0
# CREATE EXTENSIONS pgrouting;
ENV PGROUTING_VERSION=3.8.0
ENV PGROUTING_SHA256=b8a5f0472934fdf7cda3fb4754d01945378d920cdaddc01f378617ddbb9c447f
RUN git clone https://github.com/pgRouting/pgrouting.git /tmp/pgrouting && \
cd /tmp/pgrouting && \
git checkout v${PGROUTING_VERSION} && \
mkdir build && \
cd build && \
cmake .. && \
make && \
make install && \
cd / && \
rm -rf /tmp/pgrouting
# CREATE EXTENSION vector;
RUN git clone https://github.com/pgvector/pgvector.git /tmp/pgvector && \
cd /tmp/pgvector && \
make clean && \
make OPTFLAGS="" && \
make install && \
mkdir /usr/share/doc/pgvector && \
cp LICENSE README.md /usr/share/doc/pgvector && \
cd / && \
rm -rf /tmp/pgvector
# CREATE EXTENSION age;
RUN git clone https://github.com/apache/incubator-age /tmp/age && \
cd /tmp/age && \
make && \
make install && \
cd / && \
rm -rf /tmp/age
# CREATE EXTENSION timescaledb;
RUN git clone https://github.com/timescale/timescaledb /tmp/timescaledb && \
cd /tmp/timescaledb && \
./bootstrap && \
cd build && \
make && \
make install && \
rm -rf /tmp/timescaledb
# CREATE EXTENSION h3;
#RUN git clone https://github.com/zachasme/h3-pg /tmp/h3 && \
# cd /tmp/h3 && \
# cmake -B build -DCMAKE_BUILD_TYPE=Release && \
# cmake --build build && \
# cmake --install build --component h3-pg && \
# rm -r /tmp/h3
RUN apt-get remove -y build-essential git cmake flex bison build-essential postgresql-plpython3-$PG_MAJOR postgresql-server-dev-$PG_MAJOR && \
apt-get autoremove -y && \
apt-mark unhold locales && \
rm -rf /var/lib/apt/lists/*
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
&& update-locale LANG=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LC_COLLATE=en_US.UTF-8
ENV LC_CTYPE=en_US.UTF-8
CMD ["postgres", "-c", "shared_preload_libraries=timescaledb,age"]