title | sidebarTitle | description | icon |
---|---|---|---|
Troubleshoot: missing SYS_PTRACE capability |
SYS_PTRACE |
circle-exclamation |
Subtrace requires the SYS_PTRACE
Linux capability in order to work correctly.
If you're using Subtrace in a Docker container using docker run
, you can enable that by adding the --cap-add=SYS_PTRACE
command line flag when starting your container. For example:
docker run -it --rm --cap-add=SYS_PTRACE debian:12
If you're using Subtrace with Docker Compose, add the following line to your service definition in the compose.yml
file:
services:
my-app:
image: ghcr.io/NAMESPACE/IMAGE_NAME:latest
command: "subtrace run -- ./start.sh"
cap_add:
- SYS_PTRACE
If you're deploying on Kubernetes, add the following line to your deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-deployment
spec:
replicas: 1
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-container
image: ghcr.io/NAMESPACE/IMAGE_NAME:latest
securityContext:
capabilities:
add:
- SYS_PTRACE