Giter VIP home page Giter VIP logo

go-docker's Introduction

docker.io/go-docker

Official Go SDK for Docker

Dependency management tool is required

This repository describes its dependencies in a Gopkg.toml file as created by the dep tool.

It also uses semantic versioning, and requires its users to use dep-compatible dependency management tools to ensure stability and avoid breaking changes.

The canonical import path is docker.io/go-docker.

Note: you may download it with go get -d docker.io/go-docker, but if you omit -d, you may have compile errors. Hence the dep approach is preferred.

How to use dep in your project

You can use any tool that is compatible, but in the examples below we are using dep.

Adding dependency to vendor/

$ cd $GOPATH/src/myproject
$ dep init 					# only if first time use
$ dep ensure -add docker.io/go-docker@v1    	# to use the latest version of v1.x.y

Updating dependency

$ cd $GOPATH/src/myproject
$ edit Gopkg.toml
$ dep ensure

Reference Documentation

godoc.org/docker.io/go-docker

Issues

Feel free to open issues on the Github issue tracker.

Migrating from github.com/docker/docker/client

If you were previously depending on github.com/docker/docker/client, you can run the following in bash to start using docker.io/go-docker v1 and benefiting from semantic versioning guarantees.

files=( $(find . -name '*.go' -not -path './vendor/*') )

for rule in \
    's|"github.com/docker/docker/api|"docker.io/go-docker/api|' \
    's|^([[:space:]]+)"github.com/docker/docker/client|\1client "docker.io/go-docker|' \
    's|"github.com/docker/docker/client|"docker.io/go-docker|' \
; do
    sed -i -E "$rule" ${files[*]}
done

Note that if you aliased any import they will be preserved.

go-docker's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.