Skip to content

Commit 630a695

Browse files
committed
Merge branch 'master' of github.com:CenterForOpenScience/docker-library
2 parents 832aa86 + 2096d40 commit 630a695

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

pgbouncer/Dockerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
FROM alpine:3.7
2+
3+
ENV PGBOUNCER_VERSION=1.8.1 \
4+
PGBOUNCER_SHA256=fa8bde2a2d2c8c80d53a859f8e48bc6713cf127e31c77d8f787bbc1d673e8dc8
5+
6+
RUN addgroup -S pgbouncer \
7+
&& adduser -D -S -s /sbin/nologin -G pgbouncer pgbouncer \
8+
&& apk add --no-cache --virtual .run-deps \
9+
c-ares \
10+
libevent \
11+
libressl
12+
13+
RUN apk add --no-cache --virtual .build-deps \
14+
build-base \
15+
autoconf \
16+
wget \
17+
c-ares-dev \
18+
libevent-dev \
19+
libressl-dev \
20+
&& wget https://pgbouncer.github.io/downloads/files/$PGBOUNCER_VERSION/pgbouncer-$PGBOUNCER_VERSION.tar.gz \
21+
&& echo "$PGBOUNCER_SHA256 /pgbouncer-$PGBOUNCER_VERSION.tar.gz" | sha256sum -c - \
22+
&& tar -xzvf pgbouncer-$PGBOUNCER_VERSION.tar.gz \
23+
&& cd pgbouncer-$PGBOUNCER_VERSION \
24+
&& ./configure --prefix=/usr --disable-debug \
25+
&& make \
26+
&& make install \
27+
&& mkdir /etc/pgbouncer \
28+
&& cp ./etc/pgbouncer.ini /etc/pgbouncer/ \
29+
&& touch /etc/pgbouncer/userlist.txt \
30+
&& sed -i \
31+
-e "s|logfile = |#logfile = |" \
32+
-e "s|pidfile = |#pidfile = |" \
33+
-e "s|listen_addr = .*|listen_addr = 0.0.0.0|" \
34+
-e "s|auth_type = .*|auth_type = md5|" \
35+
/etc/pgbouncer/pgbouncer.ini \
36+
&& cd .. \
37+
&& rm pgbouncer-$PGBOUNCER_VERSION.tar.gz \
38+
&& rm -rf pgbouncer-$PGBOUNCER_VERSION \
39+
&& apk del .build-deps
40+
41+
CMD ["pgbouncer", "-u", "pgbouncer", "/etc/pgbouncer/pgbouncer.ini"]

0 commit comments

Comments
 (0)