File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
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" ]
You can’t perform that action at this time.
0 commit comments