In order to ease integration of Microwalk into active development, there is now a number of Docker images that contain all necessary dependencies for a given workflow.
To build an image from one of the sub directories (<NAME>
), run the following commands from Microwalk's root directory:
# Pull most recent compile base image
docker pull mcr.microsoft.com/dotnet/sdk:6.0-alpine
# Pull most recent runtime base image
docker pull mcr.microsoft.com/dotnet/runtime:6.0-focal
# Build image
docker build -f docker/<NAME>/Dockerfile -t microwalk/microwalk-<NAME>:latest .
The base structure of each image is as follows:
/mw/ # Base folder
microwalk/ # Microwalk binaries (including relevant plugins)
mapfilegenerator/ # Tool for generating MAP files from binaries
CiReportGenerator/ # Tool for generating GitLab-compatible code
# quality reports from the analysis result
work/ # Working directory (for traces, results etc.)
Depending on the tracing backend, the individual images have a few more folders.
/mw/
jalangi2/ # Jalangi2 runtime
jstracer/
analysis.js # Analysis script
/mw/
pin/ # Pin SDK
pin
pintool/ # Pin tool
obj-intel64/ # Pin tool binaries
PinTracer.so
Path to a working directory. This is where intermediate and result files should be stored. The path and this variable are never changed, so they can be safely used for mounting Docker volumes.
Path to Microwalk binaries (both main application and plugins).
Path to MAP file generator binaries.
Path to CI report generator binaries.
Path to Jalangi2 repository, with all dependencies installed.
Path to analysis tool which is used with Jalangi2.
Path to Pin tree. The Pin executable is at $PIN_PATH/pin
.
Path to the Pintool binary (PinTracer.so
).
In general, one can create a container from a given image by running
docker run microwalk/microwalk-<NAME>
One may then copy/pull the relevant implementation and run the various tools present in the container.
In templates/ there are several templates for generic analysis tasks, which can be adapted to the specific use cases. See also docs/usage.md for a tutorial for locally analyzing a C library with Microwalk.