anchor.diff:  \
           && echo 4.0.0.dev0 > supervisor/version.txt; \
       fi \
  -    && pip3 install "git+https://github.com/zalando/patroni.git@1a6db4f5afbc3f8d7f42d1d2c57edd988e830bda#egg=patroni[kubernetes$EXTRAS]" \
  -    && sed -i 's/1, 5, 6/1, 5, 7/' /usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py \
  -    && echo "__version__ = '$PATRONIVERSION'" > /usr/local/lib/python3.6/dist-packages/patroni/version.py \
  +    && pip3 install "patroni[kubernetes$EXTRAS]==$PATRONIVERSION" \
   \
       && for d in /usr/local/lib/python3.6 /usr/lib/python3; do \
           cd $d/dist-packages \
  
positive.code: LABEL maintainer="Alexander Kukushkin <alexander.kukushkin@zalando.de>"
  
  ARG PGVERSION
  
  EXPOSE 5432 8008 8080
  
  ENV LC_ALL=en_US.utf-8 \
      PATH=$PATH:/usr/lib/postgresql/$PGVERSION/bin \
      PGHOME=/home/postgres
  
  ENV WALE_ENV_DIR=$PGHOME/etc/wal-e.d/env \
      PGROOT=$PGHOME/pgdata/pgroot \
  
negative.code: \
          # prepare 3rd sources
          && git clone -b $DECODERBUFS https://github.com/debezium/postgres-decoderbufs.git \
          && git clone -b $PLPROFILER https://github.com/bigsql/plprofiler.git \
          && git clone -b $PLPGSQL_CHECK https://github.com/okbob/plpgsql_check.git \
          && git clone git://www.sigaev.ru/plantuner.git; \
      fi \
  \
      && curl -sL https://github.com/CyberDem0n/bg_mon/archive/$BG_MON_COMMIT.tar.gz | tar xz \
      && curl -sL https://github.com/RafiaSabih/pg_auth_mon/archive/$PG_AUTH_MON_COMMIT.tar.gz | tar xz \
      && git clone -b $SET_USER https://github.com/pgaudit/set_user.git \
      && git clone -b $TIMESCALEDB https://github.com/timescale/timescaledb.git \
  \
      && apt-get install -y libevent-2.1 libevent-pthreads-2.1 python3.6 python3-psycopg2 \
  \
  