Skip to content

Commit 37a6c9f

Browse files
committed
Add instructions for using the Dockerfile in COMPILING.md
1 parent f0aa1f9 commit 37a6c9f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

COMPILING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,21 @@ the need to integrate JBMC as a separate project. Be aware that you need to
300300
change the build location (Select project in Eclipse -> Properties -> C/C++
301301
Build) to one of the src directories.
302302
303+
# WORKING WITH DOCKER
304+
305+
To compile and run the tools in a Docker container, do the following:
306+
307+
1. From the root folder of the project, run `$ docker build -t cbmc .`
308+
2. After the building phase has finished, there should be a new
309+
image with the CProver binaries installed under `/usr/local/bin/`.
310+
311+
To start a container using that image as a base, run `$ docker run -i -t cbmc`
312+
This will result in dropping you to a new terminal inside the container. To
313+
load files for analysis into the container, one way is by mounting the folder
314+
that contains the tests to the container. A possible invocation that does that
315+
is: `$ docker run --mount type=bind,source=local/path/with/files,target=/mnt/analysis -i t cbmc`. In the
316+
resulting container, the files present in the local file system under
317+
`local/path/with/files` will be present under `/mnt/analysis`.
303318
304319
# OPTIONS AND VARIABLES
305320

0 commit comments

Comments
 (0)