anchor.diff: -FROM ubuntu:20.04 as builder
  +FROM ocaml/opam:ubuntu-21.04-ocaml-4.12 as builder
   
  -ARG BRANCH=develop
  -ARG COMMIT
  +USER root
   
  -# Install build dependencies
   RUN apt-get update && apt-get install -y \
       gcc \
       git \
  
positive.code:     unzip \
      wget
  
  # Install opam and ocaml from GitHub (Ubuntu version causes problems)
  RUN wget -qq https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh && \
      echo "/usr/local/bin" | sh install.sh && \
      opam init --disable-sandboxing --yes --compiler 4.07.1 && \
      eval $(opam env)
  
  # Force to use opam version of ocamlc.
  ENV PATH="/root/.opam/4.07.1/bin:${PATH}"
  
  # Create directory for external tools (Yices 2, JKind, CVC4)
  RUN mkdir /tools
  
  # Retrieve Yices 2
  RUN wget -qq https://yices.csl.sri.com/releases/2.6.2/yices-2.6.2-x86_64-pc-linux-gnu-static-gmp.tar.gz \
   && tar xvf yices-2.6.2-x86_64-pc-linux-gnu-static-gmp.tar.gz \
   && cp /yices-2.6.2/bin/yices-smt2 /tools/ \
   && echo Success || true
  
  # Retrieve JKind and CVC4 (required for certification)
  RUN wget -qq https://github.com/loonwerks/jkind/releases/download/v4.3.0/jkind-4.3.0.zip && unzip jkind-4.3.0.zip \
   && cp /jkind/jkind /jkind/*.jar /tools/ \
   && wget -qq https://github.com/CVC4/CVC4/releases/download/1.8/cvc4-1.8-x86_64-linux-opt -O cvc4 \
   && cp cvc4 /tools/ \
   && echo Success || true
  
  # Command for DockerHub
  RUN if [ -n "${COMMIT}" ] ; then \
    git clone --depth 25 --branch ${BRANCH} https://github.com/kind2-mc/kind2.git kind2-build && \
    cd kind2-build && git checkout ${COMMIT} && cd .. ; fi
  
  COPY . kind2-build/
  
  # Build Kind 2
  WORKDIR kind2-build
  RUN opam install -y .
  
  FROM ubuntu:20.04
  # Install runtime dependencies:
  
negative.code:     && rm -rf /var/lib/apt/lists/* \
      && adduser --disabled-password --gecos KIND2 kind2
  
  COPY --chown=kind2:kind2 --from=builder /home/opam/tools /bin/
  COPY --chown=kind2:kind2 --from=builder /home/opam/kind2-build/bin/kind2 /
  
  # Entry point.
  USER kind2
  ENTRYPOINT ["./kind2"]
  