From d247b5ae177a23e0f7d0c01329d25c8910741b18 Mon Sep 17 00:00:00 2001 From: Josh Berkus Date: Sun, 4 Nov 2018 00:31:11 -0700 Subject: [PATCH] =?UTF-8?q?Fix=20several=20build=20problems=20with=20the?= =?UTF-8?q?=20Docker=20image=20for=20testing=20Kubernet=E2=80=A6=20(#735)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Update to Postgres 10 2. Install most of the python modules from deb packages 3. Do *not* upgrade pip --- kubernetes/Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kubernetes/Dockerfile b/kubernetes/Dockerfile index a339038b..ede6d044 100644 --- a/kubernetes/Dockerfile +++ b/kubernetes/Dockerfile @@ -1,24 +1,25 @@ -FROM postgres:9.6 +FROM postgres:10 MAINTAINER Alexander Kukushkin RUN export DEBIAN_FRONTEND=noninteractive \ && echo 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";' > /etc/apt/apt.conf.d/01norecommend \ && apt-get update -y \ && apt-get upgrade -y \ - && apt-get install -y git curl jq python-psycopg2 python-yaml python-requests python-six python-pysocks \ - python-dateutil python-pip python-prettytable python-wheel python-psutil python locales \ + && apt-cache depends patroni | sed -n -e 's/.* Depends: \(python3-.\+\)$/\1/p' \ + | grep -Ev '^python3-(sphinx|etcd|consul|kazoo|kubernetes)' \ + | xargs apt-get install -y curl jq locales git python3-pip python3-wheel \ ## Make sure we have a en_US.UTF-8 locale available && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ - && pip install setuptools pip --upgrade \ + && pip install setuptools \ && pip install 'git+https://github.com/zalando/patroni.git#egg=patroni[kubernetes]' \ && mkdir -p /home/postgres \ && chown postgres:postgres /home/postgres \ # Clean up - && apt-get remove -y git python-pip python-setuptools \ + && apt-get remove -y git python-pip python-wheel \ && apt-get autoremove -y \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* /root/.cache