-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-dev
More file actions
93 lines (77 loc) · 2.57 KB
/
Dockerfile-dev
File metadata and controls
93 lines (77 loc) · 2.57 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
84
85
86
87
88
89
90
91
92
93
FROM postgres:15-bullseye
ENV POSTGIS_MAJOR 3
MAINTAINER Andrea Minetti (andrea@wavein.ch)
# ENV PLV8_VERSION=3.0.0
# RUN apt-get -y update
# RUN apt-get -y install postgresql-server-dev-13
# RUN apt-get -y install python python2
# RUN apt-get -y install gcc make g++
# RUN apt-get -y install pkg-config
# RUN apt-get -y install libc++-dev
# RUN apt-get -y install libc++abi-dev
# RUN apt-get -y install libglib2.0-dev
# RUN apt-get -y install libtinfo5
# RUN apt-get -y install curl git \
# && mkdir -p /plv8build \
# && cd plv8build \
# && curl -o plv8.tar.gz -L https://github.com/plv8/plv8/archive/v${PLV8_VERSION}.tar.gz \
# && tar -xvzf plv8.tar.gz \
# && cd plv8-${PLV8_VERSION} && make && make install \
# && rm -rf /plv8build \
# && rm -rf /var/lib/apt/lists/*
# RUN apt-get -y autoremove && apt-get clean
ENV PG_LIB=postgresql-server-dev-${PG_MAJOR}
ENV PG_BRANCH=REL_${PG_MAJOR}_STABLE
ENV PLUGIN_BRANCH=print-vars-${PG_MAJOR}
RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
&& apt-get install -y --no-install-recommends \
git python3 \
python3-pip \
postgresql-plpython3-$PG_MAJOR \
postgresql-$PG_MAJOR-wal2json \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
build-essential \
libreadline-dev \
zlib1g-dev \
bison \
libkrb5-dev \
flex \
$PG_LIB \
&& rm -rf /var/lib/apt/lists/*
# POSTGRES SOURCE
RUN cd /usr/src/ \
&& git clone https://github.com/postgres/postgres.git \
&& cd postgres \
&& git checkout $PG_BRANCH \
&& ./configure
# # DEBUGGER SOURCE
RUN cd /usr/src/postgres/contrib \
&& git clone https://github.com/ng-galien/pldebugger.git \
&& cd pldebugger \
&& git checkout print-vars \
&& make clean \
&& make USE_PGXS=1 \
&& make USE_PGXS=1 install
RUN cd /usr/src/postgres/contrib \
&& git clone https://github.com/vibhorkum/pg_background.git \
&& cd pg_background \
&& make \
&& make install
# CLEANUP
RUN rm -r /usr/src/postgres \
&& apt --yes remove --purge \
git build-essential \
libreadline-dev \
zlib1g-dev bison \
libkrb5-dev flex \
$PG_PG_LIB \
&& apt --yes autoremove \
&& apt --yes clean
# Python modules
RUN pip3 install requests
# CONFIG
#COPY *.sql /docker-entrypoint-initdb.d/
COPY *.sh /docker-entrypoint-initdb.d/
RUN chmod a+r /docker-entrypoint-initdb.d/*