Using SeaHorn with Docker
using Docker images

Docker is used to deploy applications in an predefined, portable environment which is isolated from the underlying system. Using containers and images, it encapsulates a pre-built version of an application which can then be downloaded and run with reproducible results.

Using SeaHorn within a Docker container:

First install Docker (more details for Ubuntu, OS X, and Windows), then pull the latest version from Dockerhub using

$ docker pull seahorn/seahorn

Run SeaHorn in a container using

docker run -v $(pwd):/host -it seahorn/seahorn

This should change your shell prompt to something like:

usea@00e7e5010518:/opt/seahorn$

At this point, you can

$ cd /opt/seahorn/share/seahorn/test; lit simple solve abc dsa

Building a Docker image from SeaHorn sources

It is also possible to build a local Docker container based on SeaHorn source code by following the instructions below:

$ docker build --build-arg UBUNTU=xenial --build-arg BUILD_TYPE=Release -t seahorn/seahorn-build:xenial -f docker/seahorn-build.Dockerfile .
$ docker build --build-arg UBUNTU=xenial --build-arg BUILD_TYPE=Release --build-arg -t seahorn_xenial_rel -f docker/seahorn-full-size-rel.Dockerfile .
$ docker run -v $(pwd):/host -it seahorn_xenial_rel /bin/sh -c "cp build/*.tar.gz /host/"
$ docker build -t seahorn/seahorn -f docker/seahorn.Dockerfile .

Warning about default user in the container

The SeaHorn image is based on Ubuntu 16.04, the default user is “usea” and has root access (do not use this in a production environment).

*****
Written by SeaHorn on 24 February 2018