forked from brainsam/pgbouncer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (39 loc) · 1.02 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 alpine:latest AS build_stage
WORKDIR /tmp
RUN apk --update --no-cache add \
autoconf \
autoconf-doc \
automake \
c-ares \
c-ares-dev \
curl \
gcc \
libc-dev \
libevent \
libevent-dev \
libtool \
make \
libressl-dev \
file \
pkgconf
ARG PGBOUNCER_VERSION=1.12.0
RUN curl -Lso "/tmp/pgbouncer.tar.gz" \
"https://pgbouncer.github.io/downloads/files/${PGBOUNCER_VERSION}/pgbouncer-${PGBOUNCER_VERSION}.tar.gz"
RUN mkdir /tmp/pgbouncer && \
tar -zxvf pgbouncer.tar.gz -C /tmp/pgbouncer --strip-components 1
WORKDIR /tmp/pgbouncer
RUN ./configure --prefix=/pgbouncer && \
make && \
make install
FROM alpine:latest
RUN apk --update --no-cache add \
libevent \
libressl \
ca-certificates \
c-ares \
openssl \
postgresql-client
WORKDIR /
COPY --from=build_stage /pgbouncer /pgbouncer
ADD entrypoint.sh ./
ENTRYPOINT ["./entrypoint.sh"]