Skip to content

Commit ad8d691

Browse files
authored
Merge pull request apocas#554 from alexisrolland/documentation
Add one more example for Docker run
2 parents ff63462 + f018fbf commit ad8d691

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,14 @@ docker.run('ubuntu', ['bash', '-c', 'uname -a'], [process.stdout, process.stderr
269269
});
270270
```
271271

272+
And here is one more complex example using auto-remove and Docker network.
273+
274+
``` js
275+
docker.run('some-python-image', ['python', 'main.py', arg], process.stdout, {name: 'my-python-container', HostConfig: { AutoRemove: true, NetworkMode: 'my_network'}}, function(err, data, container) {
276+
// Do stuff
277+
});
278+
```
279+
272280
### Equivalent of `docker pull` in `dockerode`:
273281

274282
* `repoTag` - container image name (optionally with tag)

0 commit comments

Comments
 (0)