-
Notifications
You must be signed in to change notification settings - Fork 31
Installation of Docker and Coding Inside Docker Image
Yulei Sui edited this page Jun 2, 2025
·
1 revision
If you encounter some problem, please check this document Trouble-Shooting-for-IDE.
-
Install Docker
- To know more about Docker - 12 mins video to understand Docker:YouTube Bilibili
- If you have installation problems on Windows. Please refer to windows-docker-problem-solutions
-
Install VSCode
- For further using and learning VSCode - Learn to code with VSCode
- If you are using Mac with Apple Silicon, please download image different from x86 user, which is given as follows.
*To install the extension, open the Extensions view (MAC: ⇧⌘X, Windows: Ctrl+Shift+X, Linux: Ctrl+Shift+X)
- Extension(1): Docker extension
- Search for
dockerto filter results and select Docker extension authored by Microsoft.
- Search for

- Extension(2): Remote Containers extension
- Search for
dev containerto filter results and select extension authored by Microsoft.
- Search for

1.2 Pull and load the pre-built image from Docker hub (or build from scratch)
docker pull svftools/software-security-analysis:latest
docker run -itd svftools/software-security-analysis:latest /bin/bash

Right click the container item and select 'Attach Visual Studio Code'

If you can't see the working directory, please select file -> open (folder)... then enter the /home/SVF-tools/Software-Security-Analysis

- To install the extension, open the Extensions view (MAC: ⇧⌘X, Windows: Ctrl+Shift+X, Linux: Ctrl+Shift+X)


- VSCode's built-in debugger helps your editing, compilation and debugging.
- Software-Security-Analysis has prepared configurations in
launch.jsonin.vscodefolder to debug hello.cpp inHelloWorldfolder. - More information VSCode-debugging
- If you just want to compile without using the VSCode tools you can run this command in the terminal which will compile everything and put the executables inside the
binfolder
cmake -DCMAKE_BUILD_TYPE=Debug . && make

When working on different labs/assignments, change the "program" and "args" fields in launch.json
| Lab/Assignment | "program" | "args" |
|---|---|---|
| Lab-Exercise-1 | "${workspaceFolder}/bin/lab1" | "test1" |
| Lab-Exercise-2 | "${workspaceFolder}/bin/lab2" | "test1" |
| Lab-Exercise-3 | "${workspaceFolder}/bin/lab3" | "test1" |
| Assignment-1 | "${workspaceFolder}/bin/ass1" | "-icfg", "${workspaceFolder}/Assignment-1/Tests/testcases/icfg/test1.ll" "-pta", "${workspaceFolder}/Assignment-1/Tests/testcases/pta/test1.ll" "-taint", "${workspaceFolder}/Assignment-1/Tests/testcases/taint/test1.ll" |
| Assignment-2 | "${workspaceFolder}/bin/ass2" | "${workspaceFolder}/Assignment-2/Tests/testcases/sse/test1.ll" |
| Assignment-3 | "${workspaceFolder}/bin/ass3" | "${workspaceFolder}/Assignment-3/Tests/testcases/ae/test1.ll" |