
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
docker-run
Advanced tools
Start a docker image and attach to it
npm install docker-run
There is also a command line tool available
var run = require('docker-run')
var child = run('mafintosh/dev', {tty:true})
process.stdin.setRawMode(true)
process.stdin.pipe(child.stdin)
child.stdout.pipe(process.stdout)
child.stderr.pipe(process.stderr)
child = run(image, [options])Where options can be
{
net: 'bridge', // network mode (auto | host | bridge). defaults to bridge
tty: true, // be a tty. defaults to false
fork: true, // fork (do not attach stdio). defaults to false
remove: true, // remove the container on stop. defaults to true
dns: ['8.8.8.8'], // set custom dns servers
ports: {
8080: 8081 // expose container 8080 to host 8081
},
volumes: {
'/root': '/tmp', // expose container /root to host /tmp
'/root': '/tmp2:ro' // expose container /root to host /tmp2 as read only
},
links: {
'container-name': 'alias' // link container-name as alias
},
env: {
FOO: 'bar' // set env vars
},
entrypoint: '/bin/bash' // override entrypoint on container,
beforeCreate: function (remoteOpts, instance) {} // remoteOpts is the generated docker remote JSON
}
child.stdin, child.stderr, child.stdoutThe stdio streams for the container. Is null if fork: true
child.destroy()Destroy the child container
child.resize(wid, hei)Resize the container pty (if tty: true)
child.on('exit', exitCode)Emitted when the container exits
child.on('spawn', containerId)Emitted when the container is spawned
child.on('error', error)Emitted if the container experiences a fatal error
To install the command line tool do
npm install -g docker-run
And then run
docker-run --help
To view the help. In general to run an image do
docker-run [image]
MIT
FAQs
Start a docker image and attach to it
The npm package docker-run receives a total of 141 weekly downloads. As such, docker-run popularity was classified as not popular.
We found that docker-run demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.