<@U01SXKFNT3K>: does colima expose the same HTTP A...
# development
w
@proud-dentist-22844: does colima expose the same HTTP API as docker?
cc @curved-television-6568
slash config
p
uhm. I use the standard
docker
cli to interact with it.
w
our integration on the rust side uses the bollard crate, which uses the HTTP api
…oh. but i suppose that if it uses exactly the
docker
CLI client binary, then it probably does expose the same API
p
Should work just fine. Colima works on top of Lima. Lima provides a linux VM and then Colima runs an image with docker (or containerd) installed in it . Then it uses socket forwarding to make it available. Instead of a graphical GUI like docker for mac, I use the CLI to start/stop that VM:
colima start -p docker
(I customize the colima profile name - you could leave the
-p ...
off) and
colima stop -p docker
. So, in my PyCharm config, I pass it the path to a unix socket to use for TCP communication:
unix:///Users/<user>/.colima/<colima_profile>/docker.sock
The only difference I can think of is if you're adding workarounds for docker-for-mac based on platform detection, that platform detection needs to account for how docker is running as there are multiple ways to run docker on a mac, and the fs mount types available differ a bit between docker-for-mac and colima.
w
The only difference I can think of is if you’re adding workarounds for docker-for-mac based on platform detection
i am, yea. it’s possible that
colima
used with
virtiofs
won’t suffer from https://github.com/pantsbuild/pants/issues/18162, but until users have tested, i won’t be able to tell. and we don’t have a great repro… sigh.
i’m currently planning to do pure platform detection to set the default value, but let users override the value if they want to force a different strategy: can hopefully make the detection more subtle (or remove it entirely) in future versions
p
Sounds like a plan. I just saw the title of your PR and thought I'd warn you about more dragons lurking around docker on mac.
w
thank you!
c
interesting. I’ve got a bit out of touch regarding docker as I no longer use it on a daily basis… and have totally missed colima.
so thanks for that nugget.. checking it out now 🙂
👍 1