This package presents a client for the Docker remote API.
This package presents a client for the Docker remote API. It also provides
support for the extensions in the [Swarm API](https://docs.docker.com/swarm/API/).
For more details, check the [remote API documentation](http://docs.docker.io/en/latest/reference/api/docker_remote_api/).
For more details, check the [remote API documentation](http://docs.docker.com/en/latest/reference/api/docker_remote_api/).
## Example
## Example
...
@@ -16,6 +17,7 @@ package main
...
@@ -16,6 +17,7 @@ package main
import(
import(
"fmt"
"fmt"
"github.com/fsouza/go-dockerclient"
"github.com/fsouza/go-dockerclient"
)
)
...
@@ -34,6 +36,32 @@ func main() {
...
@@ -34,6 +36,32 @@ func main() {
}
}
```
```
## Using with Boot2Docker
Boot2Docker runs Docker with TLS enabled. In order to instantiate the client you should use NewTLSClient, passing the endpoint and path for key and certificates as parameters.
For more details about TLS support in Boot2Docker, please refer to [TLS support](https://github.com/boot2docker/boot2docker#tls-support) on Boot2Docker's readme.