docker-ssh
v2.0.0
Published
Access docker daemon through SSH
Downloads
14
Readme
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 [email protected] 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('[email protected]')
let containers = await client.listContainers()
// code
}
main()