osquery / osquery/osquery

New table: docker_context

Open
#9,004 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docker virtual tables wishlist
Dominant language
C++
Stars
23.6k
Forks
2.6k
Avg merge
6d 7h
Merged PRs (30d)
14

Description

Feature request

What new feature do you want?

New table to list all available Docker contexts.

How is this new feature useful?

Tools like Podman and Rancher Desktop can create a new Docker context, and switch the context to the new one, and all docker commands will work.

Example with Rancher Desktop on my Mac:

➜  docker context ls
NAME                DESCRIPTION                               DOCKER ENDPOINT                                 ERROR
default             Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                     
desktop-linux       Docker Desktop                            unix:///Users/myuser/.docker/run/docker.sock   
rancher-desktop *   Rancher Desktop moby context              unix:///Users/myuser/.rd/docker.sock  

That would support Rancher Desktop out of the box, and also Podman when Docker compatibility is added.

How can this be implemented?

It would be great that a docker_contexttable exists so that we can find out which contexts are available, and better yet, the other docker_ tables would use the Docker socket from the active context to get images, containers, etc.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the existing docker_ tables and compare their behavior with docker context ls. Define the scope for a docker_context table and whether existing Docker tables should follow the active context; done should include a working context listing and clear behavior for those tables, with tests covering the result.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, docker
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.