11FROM ubuntu:24.04
22
33# Stop ubuntu-20 interactive options.
4- ENV DEBIAN_FRONTEND noninteractive
4+ ENV DEBIAN_FRONTEND= noninteractive
55ARG TARGETPLATFORM
66
77# Stop script if any individual command fails.
@@ -19,7 +19,7 @@ ENV HOME=/home/SVF-tools
1919# Launchpad PPA infrastructure has been intermittently unreachable
2020# (HTTP 504 from add-apt-repository), and SVF itself does not pin a Python
2121# version, so the base-image python is sufficient.
22- ENV lib_deps="cmake g++ gcc git zlib1g-dev libncurses5-dev libtinfo6 build-essential libssl-dev libpcre2-dev zip libzstd-dev python3-dev"
22+ ENV lib_deps="cmake g++ gcc git zlib1g-dev libncurses5-dev libtinfo6 build-essential libssl-dev libpcre2-dev zip libzstd-dev python3-dev libc6-dbg "
2323ENV build_deps="wget xz-utils git gdb tcl"
2424
2525# Fetch dependencies.
@@ -35,7 +35,7 @@ RUN echo "Building SVF ..."
3535RUN bash ./build.sh debug
3636
3737# Export SVF, llvm, z3 paths
38- ENV PATH=${HOME}/SVF/Release -build/bin:$PATH
38+ ENV PATH=${HOME}/SVF/Debug -build/bin:$PATH
3939ENV PATH=${HOME}/SVF/llvm-$llvm_version.obj/bin:$PATH
4040ENV SVF_DIR=${HOME}/SVF
4141ENV LLVM_DIR=${HOME}/SVF/llvm-$llvm_version.obj
@@ -47,8 +47,17 @@ WORKDIR ${HOME}
4747RUN git clone "https://github.com/SVF-tools/Software-Analysis-Studio.git"
4848WORKDIR ${HOME}/Software-Analysis-Studio
4949RUN echo "Building Software-Analysis-Studio ..."
50- RUN sed -i 's/lldb/gdb/g' ${HOME}/Software-Analysis-Studio/.vscode/launch.json
51- RUN cmake -DCMAKE_BUILD_TYPE=Debug .
50+ COPY .vscode/launch.json .vscode/launch.json
51+ COPY .vscode/tasks.json .vscode/tasks.json
52+ RUN cmake \
53+ -DCMAKE_BUILD_TYPE=Debug \
54+ -DSVF_DIR="${SVF_DIR}/Debug-build/lib/cmake/SVF" \
55+ -DLLVM_DIR="${LLVM_DIR}/lib/cmake/llvm" \
56+ -DZ3_DIR="${Z3_DIR}" \
57+ .
5258RUN make -j8
5359
60+ # GDB inside a Dev Container requires ptrace permissions at container runtime.
61+ LABEL devcontainer.metadata='[{"capAdd":["SYS_PTRACE"],"securityOpt":["seccomp=unconfined"]}]'
62+
5463CMD ["/bin/bash" ]
0 commit comments