Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Agent: allow listing running devcontainers #16268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
johnstcn opened this issue Jan 27, 2025 · 0 comments · Fixed by #16346
Closed

Agent: allow listing running devcontainers #16268

johnstcn opened this issue Jan 27, 2025 · 0 comments · Fixed by #16346
Assignees

Comments

@johnstcn
Copy link
Member

Expose a handler and endpoint in the Agent API to list all running devcontainers.

Running devcontainers will be identified using a combination of docker ps -q and docker inspect commands.

If the docker binary is not present in the agent's $PATH or the agent lacks required permissions, log the error and return the error on subsequent requests to the endpoint.

Also expose an endpoint in the Coder API to allow directly querying this agent API endpoint, similar to the "listening ports" endpoint.

For now, only support Docker via docker CLI.

@johnstcn johnstcn self-assigned this Jan 27, 2025
johnstcn added a commit that referenced this issue Feb 10, 2025
Fixes #16268

- Adds `/api/v2/workspaceagents/:id/containers` coderd endpoint that allows listing containers
visible to the agent. Optional filtering by labels is supported.
- Adds go tools to the `coder-dylib` CI step so we can generate mocks if needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant