fix(snapshot): Dockerfile 安装 postgresql-client-16 匹配目标 PG 版本
bookworm 默认 postgresql-client 是 15,目标数据库是 PG16 添加 PGDG 源安装 postgresql-client-16 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
470dc1ccd0
commit
9a88fb473a
|
|
@ -17,12 +17,15 @@ FROM node:20-slim AS production
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
# 安装系统工具: openssl, curl (健康检查), postgresql-client (pg_basebackup)
|
||||
# 安装系统工具 + PostgreSQL 16 客户端 (匹配目标数据库版本)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
openssl \
|
||||
curl \
|
||||
ca-certificates \
|
||||
postgresql-client \
|
||||
openssl curl ca-certificates gnupg lsb-release \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" \
|
||||
> /etc/apt/sources.list.d/pgdg.list \
|
||||
&& curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/pgdg.gpg \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||
postgresql-client-16 gzip \
|
||||
&& apt-get purge -y gnupg lsb-release && apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 安装 MinIO 客户端 (mc)
|
||||
|
|
|
|||
Loading…
Reference in New Issue