Class Docker::Image
In: lib/docker/image.rb
Parent: Object

This class represents a Docker Image.

Methods

all   build   build_from_dir   build_from_tar   create   delete   delete   exist?   get   import   import_stream   insert_local   load   prune   push   refresh!   remove   remove   run   save   save   save_stream   save_stream   search   tag   to_s  

Included Modules

Docker::Base

Public Class methods

Given a directory that contains a Dockerfile, builds an Image.

If a block is passed, chunks of output produced by Docker will be passed to that block.

Given File like object containing a tar file, builds an Image.

If a block is passed, chunks of output produced by Docker will be passed to that block.

Import an Image from the output of Docker::Container#export. The first argument may either be a File or URI.

Save the raw binary representation or one or more Docker images

@param names [String, Array#String] The image(s) you wish to save @param filename [String] The file to export the data to. @param conn [Docker::Connection] The Docker connection to use

@return [NilClass, String] If filename is nil, return the string representation of the binary data. If the filename is not nil, then return nil.

Stream the contents of Docker image(s) to a block.

@param names [String, Array#String] The image(s) you wish to save @param conn [Docker::Connection] The Docker connection to use @yield chunk [String] a chunk of the Docker image(s).

Given a query like `{ :term => ‘sshd’ }`, queries the Docker Registry for a corresponding Image.

Public Instance methods

delete(opts = {})

Alias for remove

delete(opts = {})

Alias for remove

Given a path of a local file and the path it should be inserted, creates a new Image that has that file.

Update the @info hash, which is the only mutable state in this object.

Remove the Image from the server.

Given a command and optional list of streams to attach to, run a command on an Image. This will not modify the Image, but rather create a new Container to run the Image. If the image has an embedded config, no command is necessary, but it will fail with 500 if no config is saved with the image

Save the image as a tarball

Save the image as a tarball to an IO object.

Return a String representation of the Image.

[Validate]