Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is `docker serve` command

Sometimes in WSL distributions that I've marked to enable for "integration" I can see process with:

docker serve --address /root/.docker/run/docker-cli-api.sock

docker serve --help states it's "Start an api server". This socket seems implement non-http-based protocol unlike standard /var/run/docker.sock.

I can't find any references.

like image 660
pyhedgehog Avatar asked Aug 09 '26 06:08

pyhedgehog


1 Answers

This search on GitHub pointed me to the source code. It seems to open several different servers for Docker components here and then start a grpc server:

    composev1.RegisterComposeServer(s, p)
    containersv1.RegisterContainersServer(s, p)
    contextsv1.RegisterContextsServer(s, p.ContextsProxy())
    streamsv1.RegisterStreamingServer(s, p)
    volumesv1.RegisterVolumesServer(s, p)
    
    ...

    // start the GRPC server to serve on the listener
    return s.Serve(listener)

Sorry, I have not found any reference or documentation for this and hope this is at least slightly helpful.

like image 75
tentative Avatar answered Aug 12 '26 13:08

tentative



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!