aio-libs / aiodocker

Python Docker API client based on asyncio and aiohttp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FR: Support for docker contexts (configured in ~/.docker/)

pyhedgehog opened this issue · comments

It would be good to take advantage of docker context.
Related issue in "sync" library: docker/docker-py#2616

I'm going to handle this in #748.

I’ve been thinking about the scope of this issue.
I believe the next steps might be as follows. What do you think?
Apologies if I am off the mark.

  • add docker socket path
    • Add DOCKER_CONTEXT
    • Read files such as ~/.docker/context/meta.json and set the socket
      • Add support for Docker client contexts (e.g., OrbStack)
  • Enable aiodocker to use the functionality of docker context

@jrfk Yes, those are the goals.
Please refer my own prior implementation in the Backend.AI project:
https://github.com/lablup/backend.ai/blob/7c255bc5ca27cd582ab2b7f9d6e026df588d77a2/src/ai/backend/common/docker.py#L114