A cross-platform way to get path to docker socket
const socketPath = require('get-docker-socket')() const Docker = require('dockerode') const docker = new Docker({socketPath}) docker.listImages(/*...*/)
MIT, 2017 (c) Dmitry Tsvettsikh