Skip to content

Enhancement: exposing Docker API listening socket(s) #33784

@shauera

Description

@shauera

Motivation:
Currently an application that would like to integrate with Docker by calling it's APIs has to either rely on docker listening on the default socket or be (manually) configured with the socket in case it differs from the default.

Such an application can try detecting the socket by parsing a running Docker process command line parameters and might need to parse the Docker configuration file. However, this duplicates Docker's logic inside the application and it's very brittle. Inspecting Docker's open file descriptors (e.g. through /proc) is not optimal either as file descriptors other than the API socket/s are held open.

Exposing the API sockets may also facilitate Docker CLI such that it will be able to communicate with a Docker host that is not listening on the default socket (changes to Docker CLI will go into a separate issue).

Implementation:
The idea is to publish the socket info into a file, say similar to publishing the Docker PID through the docker.pid file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiAPIkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions