我正在尝试使用 RedHat 通用基础镜像(registry.access.redhat.com/ubi8/ubi)为 OpenShift v4 创建一个镜像。不幸的是,这个图像至少对我来说有一些限制,即缺少 wget,最重要的是,我的公司代理弄乱了 SSL 证书,所以我从 dockerfile 创建构建并直接在 OpenShift 中运行它们。
到目前为止,我的 Dockerfile 看起来像:
FROM registry.access.redhat.com/ubi8/ubi
RUN \
dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm && \
dnf install -y postgresql13-server
CMD [ "systemctl start postgresql-13" ]
最终出现“错误:GPG 检查失败”。我需要一些帮助,如何使用来自 RedHat 的图像和 Docker 的 rpm 包创建正确的 Dockerfile。任何其他想法都非常受欢迎。提前致谢!
最佳答案
rpm --import https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-AARCH64
或任何适合您的版本的键postgres "-D" "$POSTGRESQL_DATA_DIR" "--config-file=$POSTGRESQL_CONF_FILE" "--external_pid_file=$POSTGRESQL_PID_FILE" "--hba_file=$POSTGRESQL_PGHBA_FILE"
TL,DR:除非必须,否则不要重新发明轮子,也不要创建自定义数据库图像。如果您必须 - 从知名供应商的现有 Dockerfile 中汲取灵感。
关于docker - OpenShift 上的 pgAdmin 使用 RedHat 基本镜像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64612110/