Skip to content

Commit 9ac1485

Browse files
committed
Update posgresql disrt to 9.6.7
1 parent 592beea commit 9ac1485

File tree

7 files changed

+21
-326
lines changed

7 files changed

+21
-326
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "jsquery"]
2+
path = jsquery
3+
url = https://github.com/postgrespro/jsquery.git

9.6/alpine/Dockerfile

Lines changed: 0 additions & 150 deletions
This file was deleted.

9.6/docker-entrypoint.sh

Lines changed: 0 additions & 169 deletions
This file was deleted.

9.6/Dockerfile renamed to Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN set -x \
2121
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
2222
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
2323
&& export GNUPGHOME="$(mktemp -d)" \
24-
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
24+
&& gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
2525
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
2626
&& rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \
2727
&& chmod +x /usr/local/bin/gosu \
@@ -33,15 +33,16 @@ RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/*
3333
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
3434
ENV LANG en_US.utf8
3535

36-
RUN mkdir /docker-entrypoint-initdb.d
36+
COPY docker-entrypoint-initdb.d/ /docker-entrypoint-initdb.d/
37+
#RUN mkdir /docker-entrypoint-initdb.d
3738

3839
RUN set -ex; \
3940
# pub 4096R/ACCC4CF8 2011-10-13 [expires: 2019-07-02]
4041
# Key fingerprint = B97B 0AFC AA1A 47F0 44F2 44A0 7FCC 7D46 ACCC 4CF8
4142
# uid PostgreSQL Debian Repository
4243
key='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8'; \
4344
export GNUPGHOME="$(mktemp -d)"; \
44-
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
45+
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key"; \
4546
gpg --export "$key" > /etc/apt/trusted.gpg.d/postgres.gpg; \
4647
rm -rf "$GNUPGHOME"; \
4748
apt-key list
@@ -126,8 +127,17 @@ ENV PGDATA /var/lib/postgresql/data
126127
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
127128
VOLUME /var/lib/postgresql/data
128129

130+
COPY jsquery/ /opt/jsquery/
131+
132+
RUN apt-get update && apt-get install -y postgresql-server-dev-9.6
133+
134+
RUN cd /opt/jsquery \
135+
&& make USE_PGXS=1 \
136+
&& make USE_PGXS=1 install
137+
129138
COPY docker-entrypoint.sh /usr/local/bin/
130-
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
139+
RUN chmod 777 /usr/local/bin/docker-entrypoint.sh \
140+
&& ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat
131141
ENTRYPOINT ["docker-entrypoint.sh"]
132142

133143
EXPOSE 5432

docker-entrypoint-initdb.d/init.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE EXTENSION jsquery;

9.6/alpine/docker-entrypoint.sh renamed to docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
4444
chmod 700 "$POSTGRES_INITDB_XLOGDIR"
4545
fi
4646

47-
exec su-exec postgres "$BASH_SOURCE" "$@"
47+
exec gosu postgres "$BASH_SOURCE" "$@"
4848
fi
4949

5050
if [ "$1" = 'postgres' ]; then
@@ -76,7 +76,6 @@ if [ "$1" = 'postgres' ]; then
7676
Docker's default configuration, this is
7777
effectively any other container on the same
7878
system.
79-
8079
Use "-e POSTGRES_PASSWORD=password" to set
8180
it in "docker run".
8281
****************************************************
@@ -142,4 +141,4 @@ if [ "$1" = 'postgres' ]; then
142141
fi
143142
fi
144143

145-
exec "$@"
144+
exec "$@"

0 commit comments

Comments
 (0)