Giter VIP home page Giter VIP logo

docker-modem's Introduction

docker-modem

Docker's Remote API network layer module.

docker-modem will help you interacting with Docker, since it already implements all the network strategies needed to support all Docker's Remote API endpoints.

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

Usage

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: 'http://192.168.1.10', port: 3000});
var modem4 = new Modem({protocol:'http', host: '127.0.0.1', port: 3000});
var modem5 = new Modem({host: '127.0.0.1', port: 3000}); //defaults to http

SSH

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({
  protocol: 'ssh',
  host: 'ssh://127.0.0.1',
  port: 22
});

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

Tests

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

Sponsors

Amazing entities that sponsor my open-source work. Check them out!

HTTP Toolkit

License

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:

http://www.apache.org/licenses/LICENSE-2.0.html

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.

docker-modem's People

Contributors

apocas avatar bwateratmsft avatar dependabot[bot] avatar rmg avatar lightsofapollo avatar steverice avatar pimterry avatar vincentwoo avatar x13machine avatar knight42 avatar geek avatar thlorenz avatar robertgzr avatar mcollina avatar briceburg avatar foliea avatar mtp1376 avatar nwalters512 avatar nmorsman avatar oliversalzburg avatar rumkin avatar retojenni avatar roy-codefresh avatar srijs avatar samuel-olivier avatar selfhostedpro avatar skadisch avatar stuk avatar tjmehta avatar refractalize avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.