(There are Docker libraries for many popular programming languages that know how to natively talk to the socket, though you may need to explicitly set an environment variable DOCKER_HOST=unix:///run/docker.sock which is a little bit non-default.)