anchor.diff:    curl \
     g++ \
     git \
  -  libcurl4-openssl-dev \
  -  libssl-dev \
     libtool \
     make \
     openjdk-11-jdk-headless \
  
positive.code:   unzip \
    zlib1g-dev
  
  # curl
  RUN git clone --depth=1 -b curl-7_55_1 https://github.com/curl/curl.git /tmp/curl && \
      cd /tmp/curl && \
      ./buildconf && \
      ./configure --disable-ldap --disable-shared --without-libssh2 \
                  --without-librtmp --without-libidn --enable-static \
                  --with-pic --with-ssl && \
      make -j && make install && \
      cd ~ && rm -rf /tmp/curl
  
  
negative.code:     make -j && make install && \
      cd ~ && rm -rf /tmp/glog
  
  # gRPC & protobuf
  # Use the protobuf version from gRPC for everything to avoid conflicting
  # versions to be linked in. Disable OpenSSL embedding: when it's on, the build
  # process of gRPC puts the OpenSSL static object files into the gRPC archive
  # which causes link errors later when the agent is linked with the static
  # OpenSSL library itself.
  RUN git clone --depth=1 --recursive -b v1.28.1 https://github.com/grpc/grpc.git /tmp/grpc && \
      cd /tmp/grpc && \
      cd third_party/protobuf && \
      ./autogen.sh && \
      ./configure --with-pic CXXFLAGS="$(pkg-config --cflags protobuf)" LIBS="$(pkg-config --libs protobuf)" LDFLAGS="-Wl,--no-as-needed" && \
      make -j && make install && ldconfig && \
      cd ../.. && \
      CPPFLAGS="-I /usr/local/ssl/include" LDFLAGS="-L /usr/local/ssl/lib/ -Wl,--no-as-needed" make -j CONFIG=opt EMBED_OPENSSL=false V=1 HAS_SYSTEM_OPENSSL_NPN=0 && \
      CPPFLAGS="-I /usr/local/ssl/include" LDFLAGS="-L /usr/local/ssl/lib/ -Wl,--no-as-needed" make CONFIG=opt EMBED_OPENSSL=false V=1 HAS_SYSTEM_OPENSSL_NPN=0 install && \
      rm -rf /tmp/grpc
  