Files
pgcat/Dockerfile

23 lines
635 B
Docker
Raw Permalink Normal View History

FROM rust:1.81.0-slim-bookworm AS builder
RUN apt-get update && \
apt-get install -y build-essential
2022-02-11 12:02:08 -08:00
COPY . /app
WORKDIR /app
RUN cargo build --release
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -o Dpkg::Options::=--force-confdef -yq --no-install-recommends \
postgresql-client \
# Clean up layer
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& truncate -s 0 /var/log/*log
2022-02-11 12:02:08 -08:00
COPY --from=builder /app/target/release/pgcat /usr/bin/pgcat
COPY --from=builder /app/pgcat.toml /etc/pgcat/pgcat.toml
WORKDIR /etc/pgcat
2022-02-21 17:49:32 -08:00
ENV RUST_LOG=info
CMD ["pgcat"]
2024-06-21 01:23:41 -05:00
STOPSIGNAL SIGINT