docker-ssh

2.0.0 • Public • Published

docker-ssh

A tool to connect to the docker daemon through ssh.

Command line

Installation

npm install -g docker-ssh

Usage

docker-ssh --ssh-host <host> <docker_command>...

Example

docker-ssh --ssh-host user@example.com ps -aq

Javascript

The javascript version of this is a thin wrapper around dockerode

Installation

npm install docker-ssh

Usage

docker.ssh returns an instance of dockerode. This module only handles the setup/teardown of the ssh tunnel

const docker = require('docker-ssh')
async function main() {
  const {client, cleanup} = await docker.ssh('user@example.com')
  let containers = await client.listContainers()
  // code
}
main()

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i docker-ssh

    Weekly Downloads

    2

    Version

    2.0.0

    License

    ISC

    Unpacked Size

    3.8 kB

    Total Files

    5

    Last publish

    Collaborators

    • joshwillik