DockerApi v0.1.3 DockerApi.Image View Source

Link to this section Summary

Functions

Link to this section Functions

Link to this function

build(opts \\ [], connection \\ %DockerApi.Connection{})

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImageBuild

TODO: Writing example and change content type header.

Link to this function

commit(opts \\ [], connection \\ %DockerApi.Connection{})

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImageCommit

TODO: Writing example.

Link to this function

create(opts \\ [], connection \\ %DockerApi.Connection{})

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImageCreate

TODO: Writing example.

Link to this function

delete_build_cache(opts \\ [], connection \\ %DockerApi.Connection{})

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/BuildPrune

Example

iex> DockerApi.Image.delete_build_cache
{:ok, %{"CachesDeleted" => nil, "SpaceReclaimed" => 0}}
Link to this function

delete_unused_image(opts \\ [], connection \\ %DockerApi.Connection{})

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImagePrune

Example

iex> DockerApi.Image.delete_unused_image()
{:ok, %{"ImagesDeleted" => nil, "SpaceReclaimed" => 0}}
Link to this function

export(image, opts \\ [])

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImageGet

TODO: Writing example.

Link to this function

history(image, opts \\ [])

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImageHistory

TODO: Writing example.

Link to this function

import(opts \\ [], connection \\ %DockerApi.Connection{})

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImageLoad

TODO: Writing example.

Link to this function

inspect(image, opts \\ [])

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImageInspect

TODO: Writing example.

Link to this function

list(opts \\ [], connection \\ %DockerApi.Connection{})

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImageList

Example

iex> DockerApi.Image.list()
{:ok,
 [
   %DockerApi.Image{
     connection: %DockerApi.Connection{
       ipfamily: :local,
       unix_socket: '/var/run/docker.sock'
     },
     id: "72300a873c2ca11c70d0c8642177ce76ff69ae04d61a5813ef58d40ff66e3e7c"
   },
   %DockerApi.Image{
     connection: %DockerApi.Connection{
       ipfamily: :local,
       unix_socket: '/var/run/docker.sock'
     },
     id: "fce289e99eb9bca977dae136fbe2a82b6b7d4c372474c9235adc1741675f587e"
   }
 ]}
Link to this function

push(image, opts \\ [])

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImagePush

TODO: Writing example.

Link to this function

remove(image, opts \\ [])

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImageDelete

TODO: Writing example.

Link to this function

search(opts \\ [], connection \\ %DockerApi.Connection{})

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImageSearch

Example

iex> DockerApi.Image.search([query: [term: "elixir", limit: 1, filters: ["is-official": true]]])
{:ok,
 [
   %{
     "description" => "Elixir is a dynamic, functional language for building scalable and maintainable applications.",
     "is_automated" => false,
     "is_official" => true,
     "name" => "elixir",
     "star_count" => 388
   }
 ]}
Link to this function

several(opts \\ [], connection \\ %DockerApi.Connection{})

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImageGetAll

TODO: Writing example.

Link to this function

tag(image, opts \\ [])

View Source (since 0.1.2)

https://docs.docker.com/engine/api/v1.40/#operation/ImageTag

TODO: Writing example.