anchor.diff:  ARG OS=debian:stretch-slim
   
  -ARG LIBRESSL_VERSION=2.4.5
  +ARG OPENSSL_VERSION=1.1.0g
  +ARG OPENSSL_SHA256=de4d501267da39310905cb6dc8c6121f7a2cad45a7707f76df828fe1b85073af
   
  -ARG PCRE_VERSION=8.41
  -ARG PCRE_MD5=2e7896647ee25799cb454fe287ffcd08
  +ARG PCRE2_VERSION=10.30
  +ARG PCRE2_SHA256=b549873a39f804480c2e6145a78adcba53e38162d90ef6ea92384f6ecf2fde76
   
   ARG LIBSLZ_VERSION=1.1.0
   # No md5 for libslz yet -- the tarball is dynamically
   # generated and it differs every time.
   
  -ARG HAPROXY_MAJOR=1.7
  -ARG HAPROXY_VERSION=1.7.9
  -ARG HAPROXY_MD5=a2bbbdd45ffe18d99cdcf26aa992f92d
  +ARG HAPROXY_MAJOR=1.8
  +ARG HAPROXY_VERSION=1.8.0
  +ARG HAPROXY_MD5=6ccea4619b7183fbcc8c98bae1f9823d
   
   
   ### Runtime -- the base image for all others
  
positive.code: FROM runtime as builder
  
  RUN apt-get update && \
      apt-get install --no-install-recommends -y gcc make file libc-dev signify-openbsd
  
  
  ### LibreSSL
  
  FROM builder as ssl
  
  ARG LIBRESSL_VERSION
  
  RUN curl -OJ https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl.pub && \
      curl -OJ https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/SHA256.sig && \
      curl -OJ https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${LIBRESSL_VERSION}.tar.gz && \
      signify-openbsd -C -p libressl.pub -x SHA256.sig libressl-${LIBRESSL_VERSION}.tar.gz && \
      tar zxvf libressl-${LIBRESSL_VERSION}.tar.gz && \
      cd libressl-${LIBRESSL_VERSION} && \
      ./configure --disable-shared --prefix=/tmp/libressl && \
      make check && \
      make install
  
  
  ### PCRE
  
  FROM builder as pcre
  
  ARG PCRE_VERSION
  ARG PCRE_MD5
  
  RUN curl -OJ "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PCRE_VERSION}.tar.gz" && \
      echo ${PCRE_MD5} pcre-${PCRE_VERSION}.tar.gz | md5sum -c && \
      tar zxvf pcre-${PCRE_VERSION}.tar.gz && \
      cd pcre-${PCRE_VERSION} && \
  
      CPPFLAGS="-D_FORTIFY_SOURCE=2" \
      LDFLAGS="-fPIE -pie -Wl,-z,relro -Wl,-z,now" \
      CFLAGS="-pthread -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wall -fvisibility=hidden" \
      ./configure --prefix=/tmp/pcre --disable-shared --enable-utf8 --enable-jit --enable-unicode-properties --disable-cpp && \
      make install && \
      ./pcre_jit_test
  
  
  ### libslz
  
negative.code:     make -C haproxy-${HAPROXY_VERSION} \
        TARGET=linux2628 \
        USE_SLZ=1 SLZ_INC=../libslz/src SLZ_LIB=../libslz \
        USE_STATIC_PCRE2=1 USE_PCRE2_JIT=1 PCRE2DIR=/tmp/pcre2 \
        USE_OPENSSL=1 SSL_INC=/tmp/openssl/include SSL_LIB=/tmp/openssl/lib \
        DESTDIR=/tmp/haproxy PREFIX= \
        all \
        install-bin && \
  