by apocas

apocas /docker-modem

Docker Remote API network stack driver.

135 Stars 85 Forks Last release: 2 months ago (v2.1.4) Apache License 2.0 237 Commits 47 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

docker-modem Build Status

Docker's Remote API network layer module.

will help you talking with
, since it already implements all the network strategies needed to support all
's Remote API endpoints.

It is the module powering (network wise) dockerode and other modules.


Getting started

var Modem = require('docker-modem');
var modem1 = new Modem({socketPath: '/var/run/docker.sock'});
var modem2 = new Modem(); //defaults to above if env variables are not used
var modem3 = new Modem({host: '', port: 3000});
var modem4 = new Modem({protocol:'http', host: '', port: 3000});
var modem5 = new Modem({host: '', port: 3000}); //defaults to http


You can connect to the Docker daemon via SSH in two ways:

  • Using the built-in SSH agent.
  • Implement your own custom agent.
//built-in SSH agent
var modem1 = new Modem({
  prococol: 'ssh',
  host: 'ssh://',
  port: 22

//custom agent var customAgent = myOwnSSHAgent({host: 'ssh://', port: 22}); var modem2 = new Modem({ agent: customAgent, });


  • Tests are implemented using
    . Run them with
    npm test
  • Check dockerode tests, which is indirectly co-testing


Pedro Dias - @pedromdias

Licensed under the Apache license, version 2.0 (the "license"); You may not use this file except in compliance with the license. You may obtain a copy of the license at:

Unless required by applicable law or agreed to in writing, software distributed under the license is distributed on an "as is" basis, without warranties or conditions of any kind, either express or implied. See the license for the specific language governing permissions and limitations under the license.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.