Skip to content

Instantly share code, notes, and snippets.

@leoncamel
Created July 14, 2014 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leoncamel/dfc0492777bc2db97739 to your computer and use it in GitHub Desktop.
Save leoncamel/dfc0492777bc2db97739 to your computer and use it in GitHub Desktop.
Docker build by docker-py
import docker
c = docker.Client(base_url="http://localhost:port", version="1.11")
print(c.version())
for i in c.build(fileobj=open("file.tar"), stream=True, custom_context=True):
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment