-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (48 loc) · 1.54 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
FROM postgres:9.6
RUN set -ex; \
# pub 4096R/ACCC4CF8 2011-10-13 [expires: 2019-07-02]
# Key fingerprint = B97B 0AFC AA1A 47F0 44F2 44A0 7FCC 7D46 ACCC 4CF8
# uid PostgreSQL Debian Repository
key='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8'; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
gpg --export "$key" > /etc/apt/trusted.gpg.d/postgres.gpg; \
rm -r "$GNUPGHOME"; \
apt-key list
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
RUN apt-get update \
&& apt-get install -y \
postgresql-server-dev-$PG_MAJOR=$PG_VERSION \
pwgen \
unzip \
qt4-qmake \
make \
gcc \
g++ \
libical1a \
libical-dev \
libc6-dev \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /tmp/pg_rrule \
&& cd /tmp/pg_rrule \
&& wget https://github.com/petropavel13/pg_rrule/archive/master.zip \
&& unzip master.zip \
&& cd pg_rrule-master/src \
&& ln -s /usr/include/postgresql/${PG_MAJOR}/server/ /usr/include/postgresql/server \
&& qmake-qt4 pg_rrule.pro \
&& make \
&& cp libpg_rrule.so /usr/lib/postgresql/${PG_MAJOR}/lib/pg_rrule.so \
&& cp ../pg_rrule.control /usr/share/postgresql/${PG_MAJOR}/extension \
&& cp ../sql/pg_rrule.sql.in /usr/share/postgresql/${PG_MAJOR}/extension/pg_rrule--0.2.0.sql
RUN apt-get purge -y --auto-remove \
postgresql-server-dev-$PG_MAJOR=$PG_VERSION \
pwgen \
unzip \
qt4-qmake \
make \
gcc \
g++ \
libical-dev \
libc6-dev \
wget