# Create a Docker image that is ready to run Verdi tests,
# using Coq 8.6 compiled in 32-bit mode.

# Use Ubuntu LTS version.
FROM ubuntu:xenial
MAINTAINER Michael Ernst <mernst@cs.washington.edu>

# According to
# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/:
#  * Put "apt-get update" and "apt-get install" in the same RUN command.
#  * Do not run "apt-get upgrade"; instead get upstream to update.
RUN apt-get -qqy update \
&& apt-get -qqy install \
  software-properties-common \
  git \
  gnuplot \
  gawk \
  make \
  m4 \
  aspcud \
  ocaml \
  opam \
  gcc-multilib \
  g++-multilib \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& opam init --compiler=4.02.3+32bit --yes --auto-setup \
&& eval `opam config env` \
&& opam repo add coq-released https://coq.inria.fr/opam/released \
&& opam repo add distributedcomponents-dev http://opam-dev.distributedcomponents.net \
&& opam pin add coq 8.6.1 --yes \
&& opam pin add coq-mathcomp-ssreflect 1.6.4 --yes \
