mirror of
https://github.com/qbittorrent/docker-qbittorrent-nox.git
synced 2024-11-23 09:19:47 +00:00
Document how to run gdb debugger
This commit is contained in:
parent
afa770fc2c
commit
03ac3722c3
@ -116,7 +116,6 @@ RUN \
|
||||
bash \
|
||||
curl \
|
||||
doas \
|
||||
musl-dbg \
|
||||
python3 \
|
||||
qt6-qtbase \
|
||||
tini \
|
||||
|
35
Readme.md
35
Readme.md
@ -132,3 +132,38 @@ https://github.com/qbittorrent/qBittorrent/issues
|
||||
## Build image manually
|
||||
|
||||
Refer to [manual_build](https://github.com/qbittorrent/docker-qbittorrent-nox/tree/main/manual_build) folder.
|
||||
|
||||
## Debugging
|
||||
|
||||
To attach gdb to the running qbittorent-nox process, follow the steps below:
|
||||
|
||||
1. Before you start the container
|
||||
* Remove `--read-only` as it will need additional packages within the container. \
|
||||
Or disable the respective attributes in docker-compose.yml.
|
||||
* Add `--cap-add=SYS_PTRACE` to `docker run` argument list. \
|
||||
Or enable the respective attributes in docker-compose.yml.
|
||||
|
||||
2. Start the container
|
||||
|
||||
3. Drop into container
|
||||
```shell
|
||||
# to find container id
|
||||
docker ps
|
||||
# drop into container
|
||||
docker exec -it <container_id> /bin/sh
|
||||
```
|
||||
|
||||
4. Install packages
|
||||
```shell
|
||||
apk add \
|
||||
gdb \
|
||||
musl-dbg
|
||||
```
|
||||
|
||||
5. Attach gdb to the running process
|
||||
```shell
|
||||
# to find PID of qbittorrent-nox
|
||||
ps -a
|
||||
# attach debugger
|
||||
gdb -p <PID>
|
||||
```
|
||||
|
@ -2,6 +2,9 @@ version: "3.9"
|
||||
|
||||
services:
|
||||
qbittorrent-nox:
|
||||
# for debugging
|
||||
#cap_add:
|
||||
#- SYS_PTRACE
|
||||
container_name: qbittorrent-nox
|
||||
environment:
|
||||
#- PGID=1000
|
||||
|
@ -116,7 +116,6 @@ RUN \
|
||||
bash \
|
||||
curl \
|
||||
doas \
|
||||
musl-dbg \
|
||||
python3 \
|
||||
qt6-qtbase \
|
||||
tini \
|
||||
|
@ -3,6 +3,9 @@ version: "3.9"
|
||||
services:
|
||||
qbittorrent-nox:
|
||||
build: .
|
||||
# for debugging
|
||||
#cap_add:
|
||||
#- SYS_PTRACE
|
||||
container_name: qbittorrent-nox
|
||||
environment:
|
||||
#- PGID=1000
|
||||
|
Loading…
Reference in New Issue
Block a user