How to get into an App Container Manually with Garden-RunC Backend

236 Views Asked by At

So I have been trying this-tutorial to access the runC container from the diego-cell VM. However, when I try to run

/var/vcap/packages/runc/bin/runc exec -t <instance_id> /bin/bash

I get the error

exec failed: container "<id>" does not exist

when I run cfdot for the given application it does list this instance-id, also when navigating into the location

/var/vcap/data/garden/depot/<container_id> it exists.

But runc in unable to open the container, also when I run

runc list

the list of running containers in the vm is empty

diego-cell/49dbeca6-36eb-4910-94b9-48960891a0b1:~# /var/vcap/packages/runc/bin/runc list
ID          PID         STATUS      BUNDLE      CREATED     OWNER
diego-cell/49dbeca6-36eb-4910-94b9-48960891a0b1:~#

I've run all as root as mentioned in the link.

Why am I not able to access the runC containers, What am I missing?

(P.S: Although the intent is same, I'm not looking for cf ssh)

1

There are 1 best solutions below

0
On

I can't help with the runc method (that was answered in the devops stack exchange), but you can use the garden cli to do this by installing https://github.com/contraband/gaol manually or via a toolbelt bosh release https://github.com/cloudfoundry-community/toolbelt-boshrelease

gaol -t /var/vcap/data/garden/garden.sock shell $container-id-from-cf-dot