README.md in docker-api-1.27.0 vs README.md in docker-api-1.28.0
- old
+ new
@@ -106,11 +106,11 @@
# docker command for reference: docker version
Docker.version
# => { 'Version' => '0.5.2', 'GoVersion' => 'go1.1' }
-# docker command for reference: docker info
+# docker command for reference: docker info
Docker.info
# => { "Debug" => false, "Containers" => 187, "Images" => 196, "NFd" => 10, "NGoroutines" => 9, "MemoryLimit" => true }
# docker command for reference: docker login
Docker.authenticate!('username' => 'docker-fan-boi', 'password' => 'i<3docker', 'email' => 'dockerboy22@aol.com')
@@ -242,9 +242,19 @@
# => Docker::Image { :id => eb693ec80, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }
# Check if an image with a given id exists on the server.
Docker::Image.exist?('ef723dcdac09')
# => true
+
+# Load an image from the file system
+Docker::Image.load('./my-image.tar')
+# => ""
+
+# An IO object may also be specified for loading
+File.open('./my-image.tar', 'rb') do |file|
+ Docker::Image.load(file)
+end
+# => ""
# Export multiple images to a single tarball
# docker command for reference: docker save my_image1 my_image2:not_latest > my_export.tar
names = %w( my_image1 my_image2:not_latest )
Docker::Image.save(names, 'my_export.tar')