https://docs.docker.com/reference/api/engine/
- v1.51: https://github.com/moby/moby/blob/master/api/docs/v1.51.yaml
- Latest: https://github.com/moby/moby/blob/master/api/swagger.yaml
- Credit: https://github.com/leonitousconforti/the-moby-effect
import{Docker,UNIX_SOCKET_CONNECTION_OPTIONS}from'docker-engine-api'asyncfunctionlistContainers(){constdocker=newDocker(UNIX_SOCKET_CONNECTION_OPTIONS)try{awaitdocker.negotiateApiVersion()// optional but recommendedconstcontainerSummaries=awaitthis.docker.containers.list({all: true,// filters:})}catch(err){console.error(err)}}Huge thanks to Leo Conforti 👍