Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
HTTP client for the Docker remote API.
branch: master

This branch is 349 commits behind fsouza:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
engine
term
testing
utils
.travis.yml
AUTHORS
DOCKER-LICENSE
LICENSE
README.markdown
change.go
change_test.go
client.go
client_test.go
container.go
container_test.go
example_test.go
image.go
image_test.go
misc.go
misc_test.go

README.markdown

go-dockerclient

Build Status Build Status

GoDoc

This package presents a client for the Docker remote API.

For more details, check the remote API documentation: http://docs.docker.io/en/latest/api/docker_remote_api.

Versioning

  • Version 0.1 is compatible with Docker v0.7.1
  • The master is compatible with Docker's master

Example

package main

import (
        "fmt"
        "github.com/fsouza/go-dockerclient"
)

func main() {
        endpoint := "unix:///var/run/docker.sock"
        client, _ := docker.NewClient(endpoint)
        imgs, _ := client.ListImages(true)
        for _, img := range imgs {
                fmt.Println("ID: ", img.ID)
                fmt.Println("RepoTags: ", img.RepoTags)
                fmt.Println("Created: ", img.Created)
                fmt.Println("Size: ", img.Size)
                fmt.Println("VirtualSize: ", img.VirtualSize)
                fmt.Println("ParentId: ", img.ParentId)
                fmt.Println("Repository: ", img.Repository)
        }
}
Something went wrong with that request. Please try again.