README.md in docker-api-0.0.4 vs README.md in docker-api-0.0.5
- old
+ new
@@ -83,11 +83,11 @@
# Test if the Image is created.
image.created?
# => false
# Create the Image.
-image.create!('fromRepo' => 'base', 'fromSrc' => '-')
+image.create!('fromRepo' => 'base')
# => Docker::Image { :id => ae7ffbcd1, :connection => Docker::Connection { :url => http://localhost, :options => {:port=>4243} } }
image.created?
# => true
@@ -117,10 +117,14 @@
# => true
image.created?
# => false
+# Given a Container's export, creates a new Image.
+image.create_from_file('some-export.tar')
+# => Docker::Image { :id => 66b712aef, :connection => Docker::Connection { :url => http://localhost, :options => {:port=>4243} } }
+
# Load all Images on your Docker server.
Docker::Image.all
# => [Docker::Image { :id => b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc, :connection => Docker::Connection { :url => http://localhost, :options => {:port=>4243} } }, Docker::Image { :id => 8dbd9e392a964056420e5d58ca5cc376ef18e2de93b5cc90e868a1bbc8318c1c, :connection => Docker::Connection { :url => http://localhost, :options => {:port=>4243} } }]
# Search the Docker registry.
@@ -173,10 +177,10 @@
container.kill
# => nil
# Export a Container. Since an export is typically at least 300M, chunks of the
# export are yielded instead of just returning the whole thing.
-File.open('export.tar.gz', 'w') do |f|
+File.open('export.tar', 'w') do |f|
container.export { |chunk| file.write(chunk) }
end
# => nil
# Inspect a Container's changes to the file system.