remote debugging application inside a greengrass docker component

0

i read that i can remote debug an application in a docker container by starting the container like

docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -it <image_name>

however i don't think i can run a docker component with the -it 'interactive flag'

without the -it flag if i try to connect to a running process in the docker i receive a

Unable to start debugging. Attaching to process 29966 with GDB failed because of insufficient privileges with error message 'ptrace: Operation not permitted.'.

error.

how does anyone else debug inside a greengrass container ?

  • Hi, are you running Greengrass inside a container or are you running a component as container?

  • Hi @MassimalianoAWS , I'm running the Docker container as a component on a Greengrass device. (we have multiple Docker components actually, but this one i would like to debug)

clogwog
posta un anno fa413 visualizzazioni
1 Risposta
0

The "ptrace: Operation not permitted" error message usually occurs when you are trying to attach a debugger to a process running inside a Docker container and the container is running in a restricted environment or with insufficient privileges, In some environments, such as when running Docker containers with default security settings, ptrace is not allowed by default due to security concerns.

AWS
TECNICO DI SUPPORTO
Harsh_S
con risposta un anno fa
  • how would one get around this ? I thought the --cap-add=SYS_PTRACE and --security-opt seccomp=unconfined part of me starting up the docker container would do this ?

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande