From 43de06be8980b22caf98c0ce3f64255bc08b4e52 Mon Sep 17 00:00:00 2001 From: patryk4815 Date: Sat, 20 Sep 2025 18:10:34 +0200 Subject: [PATCH] Main Dockerfile support lldb and gdb at same time (#3307) --- Dockerfile.lldb | 69 ---------------------------------------------- docker-compose.yml | 10 ------- 2 files changed, 79 deletions(-) delete mode 100644 Dockerfile.lldb diff --git a/Dockerfile.lldb b/Dockerfile.lldb deleted file mode 100644 index a33e3e77f..000000000 --- a/Dockerfile.lldb +++ /dev/null @@ -1,69 +0,0 @@ -# This dockerfile was created for development & testing purposes, for APT-based distro. -# -# Build as: docker build -t pwndbg . -# -# For testing use: docker run --rm -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined pwndbg bash -# -# For development, mount the directory so the host changes are reflected into container: -# docker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v `pwd`:/pwndbg pwndbg bash -# - -ARG image=mcr.microsoft.com/devcontainers/base:jammy -FROM $image - -WORKDIR /pwndbg - -ENV PIP_NO_CACHE_DIR=true -ENV LANG=en_US.utf8 -ENV TZ=America/New_York -ENV PWNDBG_VENV_PATH=/venv -ENV UV_PROJECT_ENVIRONMENT=/venv - -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \ - echo $TZ > /etc/timezone && \ - apt-get update && \ - apt-get install -y locales && \ - rm -rf /var/lib/apt/lists/* && \ - localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ - apt-get update && \ - apt-get install -y vim - -# setup.sh needs scripts/common.sh -RUN mkdir scripts -ADD ./scripts/common.sh /pwndbg/scripts/ - -ADD ./setup.sh /pwndbg/ -ADD ./uv.lock /pwndbg/ -ADD ./pyproject.toml /pwndbg/ - -# pyproject.toml requires these files, pip install would fail -RUN touch README.md && mkdir pwndbg && touch pwndbg/empty.py - -RUN DEBIAN_FRONTEND=noninteractive ./setup.sh - -# Comment these lines if you won't run the tests. -ADD ./setup-dev.sh /pwndbg/ -RUN ./setup-dev.sh - -# Cleanup dummy files -RUN rm README.md && rm -rf pwndbg - -ADD . /pwndbg/ - -ARG LOW_PRIVILEGE_USER="vscode" - -# Add .gdbinit to the home folder of both root and vscode users (if vscode user exists) -# This is useful for a VSCode dev container, not really for test builds -RUN if [ ! -f ~/.gdbinit ]; then echo "source /pwndbg/gdbinit.py" >> ~/.gdbinit; fi && \ - if id -u ${LOW_PRIVILEGE_USER} > /dev/null 2>&1; then \ - su ${LOW_PRIVILEGE_USER} -c 'if [ ! -f ~/.gdbinit ]; then echo "source /pwndbg/gdbinit.py" >> ~/.gdbinit; fi'; \ - fi - -RUN apt-get install -y lldb-16 - -# Add .lldbinit to the home folder of both root and vscode users (if vscode user exists) -# This is useful for a VSCode dev container, not really for test builds -RUN if [ ! -f ~/.lldbinit ]; then echo "command script import /pwndbg/lldbinit.py" >> ~/.lldbinit; fi && \ - if id -u ${LOW_PRIVILEGE_USER} > /dev/null 2>&1; then \ - su ${LOW_PRIVILEGE_USER} -c 'if [ ! -f ~/.lldbinit ]; then echo "command script import /pwndbg/lldbinit.py" >> ~/.lldbinit; fi'; \ - fi diff --git a/docker-compose.yml b/docker-compose.yml index e873e154d..3f632e78d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -46,16 +46,6 @@ services: args: image: debian:12 - lldb: - <<: *base-spec - build: - context: . - dockerfile: Dockerfile.lldb - args: - image: debian:12 - volumes: - - .:/pwndbg - archlinux: <<: *base-spec build: