Skip to content

Commit a054b45

Browse files
authored
Add psql to the container image. (#607)
It could be used to implement container health checks. Example: PGPASSWORD="<some-password>" psql -U pgcat -p 6432 -h 127.0.0.1 -tA -c "show version;" -d pgcat >/dev/null
1 parent 04e9814 commit a054b45

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ WORKDIR /app
88
RUN cargo build --release
99

1010
FROM debian:bookworm-slim
11+
RUN apt-get update && apt-get install -o Dpkg::Options::=--force-confdef -yq --no-install-recommends \
12+
postgresql-client \
13+
# Clean up layer
14+
&& apt-get clean \
15+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
16+
&& truncate -s 0 /var/log/*log
1117
COPY --from=builder /app/target/release/pgcat /usr/bin/pgcat
1218
COPY --from=builder /app/pgcat.toml /etc/pgcat/pgcat.toml
1319
WORKDIR /etc/pgcat

0 commit comments

Comments
 (0)