Expose a Unix socket to the host system from inside from a Docker container
You can communicate the host machine or even two containers using the same socket. In the general case of two containers, you should start the two dockers from the host machine sharing a volume that should be created in the host machine.
docker run --name "containerA" -v /var/run/common_socket_dir:/var/run/common_socket_dir...
docker run --name "containerB" -v /var/run/common_socket_dir:/var/run/common_socket_dir...
Both, containerA and containerB can now use sockets as /var/run/common_socket_dir/socketX to interconnect. Of course, the host machine could use the sockets in this volume to communicate with containers