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
Run SeaHorn in a container using
This should change your shell prompt to something like:
At this point, you can
-
use SeaHorn executable found in
/opt/seahorn/bin/sea
-
run SeaHorn tests using the command
-
move files between the container and the rest of your machine using
/host
to represent the directory where you executed thedocker run
command (for example,cp /host/a b
will copy a file nameda
from your host directory to a file namedb
inside the container) -
exit the container by typing
exit
-
to persist your changes inside the container, add
--name=your_name_here
to thedocker run
command, and restart the container usingdocker start -ai your_name_here
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:
- Optionally build thrid-party dependencies. These are also available
as a
seahorn/seahorn-build
container on DockerHub.
- Compile SeaHorn binary in a docker container
- Extracted compiled binary package from the container to the host system
- Create a docker image with SeaHorn based on the binary package created in the previous step:
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).