anchor.diff:  LABEL maintainer="Alexander Kukushkin <alexander.kukushkin@zalando.de>"
   
   ARG PGVERSION
  +ARG DEMO
   
   EXPOSE 5432 8008 8080
   
   ENV LC_ALL=en_US.utf-8 \
       PATH=$PATH:/usr/lib/postgresql/$PGVERSION/bin \
  -    PGHOME=/home/postgres
  +    PGHOME=/home/postgres \
  +    DEMO=$DEMO
   
   ENV WALE_ENV_DIR=$PGHOME/etc/wal-e.d/env \
       PGROOT=$PGHOME/pgdata/pgroot \
  
positive.code:                         libpq-dev=$version* postgresql-server-dev-${version} \
  \
              # Install 3rd party stuff
              && if [ "$DEMO" != "true" ]; then \
                  if [ "$version" != "11" ]; then \
                      for extension in quantile trimmed_aggregates; do \
                          pgxn install $extension \
                          && strip /usr/lib/postgresql/$version/lib/$extension.so; \
                      done; \
                  fi \
  \
                  && if [ "$version" = "9.6" ] || [ "$version" = "10" ] || [ "$version" = "11" ] ; then \
                      cd timescaledb \
                      && rm -fr build \
                      && ./bootstrap -DAPACHE_ONLY=1 -DSEND_TELEMETRY_DEFAULT=NO \
                      && make -C build install \
                      && strip /usr/lib/postgresql/$version/lib/timescaledb*.so \
                      && cd ..; \
                  fi \
  \
                  # Install pg_rewind on 9.3 and 9.4
  
negative.code:     && find /var/log -type f -exec truncate --size 0 {} \;
  
  # Install patroni, wal-e and wal-g
  ENV PATRONIVERSION=1.6.0
  ENV WALE_VERSION=1.1.0
  ENV WALG_VERSION=v0.2.9
  RUN export DEBIAN_FRONTEND=noninteractive \
  