【发布时间】:2018-10-01 10:34:39
【问题描述】:
ENV PG_MAJOR 10
ENV PG_VERSION 10.1-1.pgdg80+1
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
RUN apt-get update \
&& apt-get install -y postgresql-common \
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
&& apt-get install -y \
postgresql-$PG_MAJOR \
postgresql-contrib-$PG_MAJOR \
&& rm -rf /var/lib/apt/lists/*
我在这部分得到以下错误:
dpkg:错误处理包python3.5-minimal(--configure): 子进程安装后安装脚本返回错误退出 状态 134 dpkg:依赖问题阻止配置 python3-minimal:python3-minimal 依赖于 python3.5-minimal (>= 3.5.1-2~);但是:尚未配置包 python3.5-minimal。
dpkg:错误处理包python3-minimal(--configure): 依赖性问题 - 留下未配置的处理触发器 libc-bin (2.23-0ubuntu10) ... 时遇到错误 处理:python3.5-minimal python3-minimal E:子进程 /usr/bin/dpkg 返回错误代码 (1)
【问题讨论】:
-
你的基础镜像是什么?你没有提到
FROM这一行。 -
基础镜像是ubuntu
-
ubuntu图像不是 xenial,因此它不像您的示例那样使用 glibc 2.23。请告诉我们您使用的FROM线路。 -
好的,我应该使用 debian 基础镜像吗?尝试使用这个:FROM gcr.io/google-appengine/debian9 请告诉我需要进行哪些更改。
-
我 更喜欢 Debian,但这真的取决于你做什么。关键是基础镜像必须与您启用并用于安装 PostgreSQL 的 PGDG 存储库一致。
标签: python dockerfile