From 5002ef19b1cf03146b9fbf5d9a551d1da414e78b Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Mon, 14 Aug 2023 11:21:00 -0400 Subject: [PATCH] Give GDB permission to attach to processes as non-root --- Docker/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 218be5c3f..f0f74507f 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -35,5 +35,7 @@ RUN cd /opt/sources && git clone --depth=1 --single-branch --branch=main http:// # Allow non-root to use tcpdump (will need NET_RAW and NET_ADMIN capability when running the container) RUN setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/tcpdump +# Allow non-root to use gdb on processes (will need SYS_PTRACE capability when running the container) +RUN setcap 'CAP_SYS_PTRACE+eip' /usr/bin/gdb USER ${UID}:${GID} \ No newline at end of file