Skip to content
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

Research the efficacy of having the docker provider utilize the docker socket instead of commands over shell out #65

Open
miversen33 opened this issue Jul 21, 2022 · 2 comments
Labels
Docker Docker Provider enhancement/request New feature or request good first issue Good for newcomers Provider Issue with a _remote_ (core) provider
Milestone

Comments

@miversen33
Copy link
Owner

Title

Right now, the docker provider talks to the docker binary to do stuff and consumes (and processes) the standard out to determine if the container is alive (in order to execute commands inside of it, browse its directory structure, etc). It might be worth seeing if we can instead just talk to the socket for more structured responses.

Or it might now be. Who knows.

@miversen33 miversen33 added enhancement/request New feature or request good first issue Good for newcomers Provider Issue with a _remote_ (core) provider labels Jul 21, 2022
@miversen33 miversen33 added this to the Backlog milestone Jul 21, 2022
@miversen33 miversen33 assigned miversen33 and unassigned miversen33 Jul 21, 2022
@miversen33 miversen33 added the Docker Docker Provider label Apr 4, 2023
@miversen33
Copy link
Owner Author

Docker engine API spec

https://docs.docker.com/engine/api/v1.42/

@miversen33
Copy link
Owner Author

Some other nice things this may handle is the ability to inspect the filesystem of containers that don't have shell access (such as distroless containers).

We can abuse the following command to "view" a container's filesystem without having to go through docker at all

sudo ls -lah /proc/$(docker inspect $CONTAINER_NAME_OR_ID --format '{{.State.Pid}}')/root/

The big issue here is that this will only work on linux. I have absolutely no idea how to accomplish this on windows. Even so, it is likely worth looking into

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docker Docker Provider enhancement/request New feature or request good first issue Good for newcomers Provider Issue with a _remote_ (core) provider
Projects
None yet
Development

No branches or pull requests

1 participant