chore: small script and file fixes
Some checks are pending
Commitlint / Run commitlint scanning (push) Waiting to run

This commit is contained in:
ahmadk953 2025-06-17 20:24:57 -04:00
parent 9a4c794d51
commit 6865672d81
No known key found for this signature in database
GPG key ID: 31D488058614185C
9 changed files with 310 additions and 141 deletions

View file

@ -11,27 +11,24 @@ ARG C_ARES_VERSION=1.34.5
RUN apk add --no-cache autoconf autoconf-doc automake curl gcc git libc-dev libevent-dev libtool make openssl-dev pandoc pkgconfig
RUN curl -Lo /c-ares.tar.gz https://github.com/c-ares/c-ares/releases/download/v${C_ARES_VERSION}/c-ares-${C_ARES_VERSION}.tar.gz && \
tar -xzf /c-ares.tar.gz && mv /c-ares-${C_ARES_VERSION} /c-ares
RUN curl -Lo /pgbouncer.tar.gz https://pgbouncer.github.io/downloads/files/${PGBOUNCER_VERSION}/pgbouncer-${PGBOUNCER_VERSION}.tar.gz && \
tar -xzf /pgbouncer.tar.gz && mv /pgbouncer-${PGBOUNCER_VERSION} /pgbouncer
RUN cd /c-ares && ./configure && make && make install
RUN cd /pgbouncer && ./configure --with-cares && make && make install
RUN set -eux; \
curl -Lo /c-ares.tar.gz https://github.com/c-ares/c-ares/releases/download/v${C_ARES_VERSION}/c-ares-${C_ARES_VERSION}.tar.gz && \
tar -xzf /c-ares.tar.gz && mv /c-ares-${C_ARES_VERSION} /c-ares && \
cd /c-ares && ./configure && make && make install && \
curl -Lo /pgbouncer.tar.gz https://pgbouncer.github.io/downloads/files/${PGBOUNCER_VERSION}/pgbouncer-${PGBOUNCER_VERSION}.tar.gz && \
tar -xzf /pgbouncer.tar.gz -C / && mv /pgbouncer-${PGBOUNCER_VERSION} /pgbouncer && \
cd /pgbouncer && ./configure --with-cares && make && make install
FROM alpine:3.22
COPY entrypoint.sh /entrypoint.sh
RUN apk add --no-cache busybox libevent postgresql-client \
&& mkdir -p /etc/pgbouncer /var/log/pgbouncer /var/run/pgbouncer \
&& touch /etc/pgbouncer/userlist.txt \
&& addgroup -S -g 1100 pgbouncer \
&& adduser -S -u 1100 -G pgbouncer pgbouncer \
&& chown -R pgbouncer:pgbouncer /etc/pgbouncer /var/log/pgbouncer /var/run/pgbouncer /entrypoint.sh \
&& chmod +x /entrypoint.sh
RUN apk add --no-cache busybox libevent postgresql-client libssl3 \
&& mkdir -p /etc/pgbouncer /var/log/pgbouncer /var/run/pgbouncer \
&& touch /etc/pgbouncer/userlist.txt \
&& addgroup -S -g 1100 pgbouncer \
&& adduser -S -u 1100 -G pgbouncer pgbouncer \
&& chown -R pgbouncer:pgbouncer /etc/pgbouncer /var/log/pgbouncer /var/run/pgbouncer
COPY --chmod=+x entrypoint.sh /entrypoint.sh
COPY --from=build /usr/local/bin /usr/local/bin
COPY --from=build /usr/local/lib /usr/local/lib
COPY --from=build /pgbouncer/etc/pgbouncer.ini /etc/pgbouncer/pgbouncer.ini.example