forked from timescale/pg_prometheus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (31 loc) · 1.15 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
FROM postgres:10.4-alpine
MAINTAINER [email protected]
ENV PG_MAJOR 10.4
ENV TIMESCALEDB_VERSION 0.11.0
COPY pg_prometheus.control Makefile /build/pg_prometheus/
COPY src/*.c src/*.h /build/pg_prometheus/src/
COPY sql/prometheus.sql /build/pg_prometheus/sql/
RUN set -ex \
&& apk add --no-cache --virtual .fetch-deps \
ca-certificates \
openssl \
tar \
git \
&& git clone https://github.com/timescale/timescaledb -b ${TIMESCALEDB_VERSION} /build/timescaledb-${TIMESCALEDB_VERSION} \
\
&& apk add --no-cache --virtual .build-deps \
coreutils \
dpkg-dev dpkg \
gcc \
libc-dev \
make \
util-linux-dev \
cmake \
\
&& cd /build/timescaledb-${TIMESCALEDB_VERSION} && ./bootstrap && cd build && make install \
\
&& make -C /build/pg_prometheus install \
\
&& apk del .fetch-deps .build-deps \
&& rm -rf /build \
&& sed -r -i "s/[#]*\s*(shared_preload_libraries)\s*=\s*'(.*)'/\1 = 'timescaledb,\2'/;s/,'/'/" /usr/local/share/postgresql/postgresql.conf.sample