forked from awslabs/pgbouncer-fast-switchover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.template
28 lines (22 loc) · 910 Bytes
/
Dockerfile.template
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
FROM $BASE_IMAGE
USER root
RUN git clone https://github.com/pgbouncer/pgbouncer.git --branch "$PGB_GITHUB_BRANCH" && \
git clone https://github.com/awslabs/pgbouncer-fast-switchover.git --branch "ci-build" && \
cd pgbouncer-fast-switchover && \
./install-pgbouncer-rr-patch.sh ../pgbouncer && \
cd ../pgbouncer && \
git submodule init && \
git submodule update && \
./autogen.sh && \
ln -s "/usr/bin/$ARCH-amazon-linux-gnu-pkg-config" "/usr/bin/$ARCH-redhat-linux-gnu-pkg-config" && \
./configure --prefix=/usr/local --exec-prefix=/usr/bin && \
make && \
make install
RUN cp /home/pgbouncer/pgbouncer/pgbouncer /usr/local/bin/
USER pgbouncer
WORKDIR /home/pgbouncer
COPY ./start.sh /start.sh
COPY ./pub_metrics.sh /pub_metrics.sh
COPY ./adaptivepgbouncer.sh /adaptivepgbouncer.sh
COPY ./routing_rules.py /home/pgbouncer/
#ENTRYPOINT ["/bin/bash", "/start.sh"]