Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docker-ssh

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker-ssh - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

26

bin/cli.js

@@ -12,8 +12,6 @@ #!/usr/bin/env node

})
let {docker_ssh_argv, docker_argv} = split_argv(process.argv)
let options = docopt(`Usage: docker-ssh --ssh-host=<host> [<docker_commands>...]`,
{argv: docker_ssh_argv})
let {socket_path, cleanup} = await docker.open_socket(options['--ssh-host'])
let options = docopt(`Usage: docker-ssh <host> [-- <docker-commands>...]`)
let {socket_path, cleanup} = await docker.open_socket(options['<host>'])
this.finally(cleanup)
let docker_child = child_process.spawn(`docker`, docker_argv, {
let docker_child = child_process.spawn(`docker`, options['<docker-commands>'], {
env: {

@@ -27,19 +25,1 @@ DOCKER_HOST: `unix://${socket_path}`,

})
function split_argv(argv) {
for (let i = 0; i < argv.length; i++) {
let x = argv[i]
if (x.startsWith('--ssh') && !x.includes('=')) {
i++; // eat the next arg, it's the value for this flag
}
if (!(x.includes('node') || x.endsWith('docker-ssh') || x.startsWith('--ssh') ||
x.endsWith('.js')))
{
return {
docker_ssh_argv: argv.slice(0, i),
docker_argv: argv.slice(i),
}
}
}
return {docker_ssh_argv: argv, docker_argv: []}
}

2

package.json
{
"name": "docker-ssh",
"version": "1.0.1",
"version": "2.0.0",
"description": "Access docker daemon through SSH",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc