-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (45 loc) · 1.34 KB
/
Dockerfile
File metadata and controls
55 lines (45 loc) · 1.34 KB
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
54
55
FROM registry.access.redhat.com/ubi9:9.6-1760340943 as base
RUN dnf install -y \
nmap-ncat \
python3 \
python3-pip \
procps \
&& dnf module install --assumeyes postgresql:16/server postgresql:16/client \
&& pip3 install -U pip \
&& pip install flatten-dict==0.4.2
FROM base as build
RUN dnf install -y\
gcc \
gcc-c++ \
kernel-headers \
make \
zlib-devel \
pcre-devel \
openssl-devel \
libxml2-devel \
libxslt-devel \
libevent-devel \
gd-devel \
perl
WORKDIR /tmp/src
COPY src .
RUN ./configure --prefix=/usr/local \
&& make \
&& make install \
&& dnf clean all \
&& mkdir /etc/pgbouncer \
&& mkdir /var/{run,log}/pgbouncer \
&& rm -rf /etc/pgbouncer/{pgbouncer.ini,userlist.txt,rdsca.cert} \
&& touch /etc/pgbouncer/{pgbouncer.ini,userlist.txt,rdsca.cert} \
&& chmod 777 /etc/pgbouncer/{pgbouncer.ini,userlist.txt,rdsca.cert} \
&& chmod 777 /var/{run,log}/pgbouncer
RUN rm -rf /tmp/src
ADD json_to_env.py /json_to_env.py
ADD entrypoint.sh /entrypoint.sh
ADD clowder_init.sh /clowder_init.sh
ADD probe-liveness.sh /probe-liveness.sh
ADD probe-readiness.sh /probe-readiness.sh
# Default is 5432, For Clowder it is 8000
EXPOSE 5432 8000
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/usr/local/bin/pgbouncer", "/etc/pgbouncer/pgbouncer.ini"]