Install latest postgres client (#577)

* Install latest postgres client

* Build on debian bullseye
This commit is contained in:
Dan Sosedoff 2022-10-25 06:55:28 -05:00 committed by GitHub
parent 13091c2a7c
commit 6fdf9261da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Builder Stage # Builder Stage
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
FROM golang:1.18-buster AS build FROM golang:1.18-bullseye AS build
WORKDIR /build WORKDIR /build
ADD . /build ADD . /build
@ -12,12 +12,19 @@ RUN make build
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Release Stage # Release Stage
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
FROM debian:buster-slim FROM debian:bullseye-slim
RUN \ RUN \
apt-get update && \ apt-get update && \
apt-get install -y ca-certificates openssl postgresql netcat && \ apt-get install -y ca-certificates openssl netcat curl gnupg lsb-release && \
update-ca-certificates && \ update-ca-certificates
RUN \
curl --silent https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add && \
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list && \
apt-get update && apt-get install -y postgresql-client
RUN \
apt-get clean autoclean && \ apt-get clean autoclean && \
apt-get autoremove --yes && \ apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/ rm -rf /var/lib/{apt,dpkg,cache,log}/