Skip to content

Instantly share code, notes, and snippets.

@gdestuynder
Created November 30, 2018 01:08
Show Gist options
  • Select an option

  • Save gdestuynder/5d7ee8bc0f56b1b54c8195f9845e3dcd to your computer and use it in GitHub Desktop.

Select an option

Save gdestuynder/5d7ee8bc0f56b1b54c8195f9845e3dcd to your computer and use it in GitHub Desktop.
Python 2.7.15 (default, Jun 27 2018, 13:05:28)
[GCC 8.1.1 20180531] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import docker
>>> client = docker.from_env()
>>> client.containers.run("ubuntu", "echo hello world")
'hello world\n'
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment