anchor.diff:      geos \
       geos-dev
   
  -RUN pip install --upgrade pip setuptools \
  -  && pip install --requirement requirements-standalone.txt \
  -  && pip install --requirement requirements-pg.txt \
  -  && pip install gunicorn \
  -  && pip install . \
  +RUN pip3 install --upgrade pip setuptools \
  +  && pip3 install --requirement requirements-standalone.txt \
  +  && pip3 install --requirement requirements-pg.txt \
  +  && pip3 install gunicorn \
  +  && pip3 install . \
     && mkdir /etc/pycsw \
     && mkdir data \
     && mv default-sample.cfg /etc/pycsw/pycsw.cfg \
  
positive.code: # version, which works fine.
  # This means that we need to use alpine's archives for version 3.1, which are
  # the ones that contain the previous version of libxml2
  RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.1/main' >> /etc/apk/repositories \
    && apk add --no-cache \
      build-base \
      ca-certificates \
      postgresql-dev \
      python-dev \
      libpq \
      libxslt-dev \
      'libxml2-dev<3.9.4' \
      wget \
    && apk add --no-cache \
      --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
  
negative.code: FROM alpine:3.4
  
  ENV PYCSW_CONFIG=/etc/pycsw/pycsw.cfg
  
  RUN adduser -D -u 1000 pycsw
  
  WORKDIR /home/pycsw
  
  COPY . .
  
  # There's bug in libxml2 v2.9.4 that prevents using an XMLParser with a schema
  # file.
  #
  # https://bugzilla.gnome.org/show_bug.cgi?id=766834
  