Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 node.js 在 localhost 环境中运行 docker rest api。我需要知道端口设置和将在其上使用的 url 等。
如果您安装了 boot2docker,它应该设置了 DOCKER_HOST 环境,在这种情况下:
var Docker = require('dockerode'); var host = require('docker-host'); var docker = new Docker(host());
应该管用