1
0
Fork 0

Migrate Sirupsen to sirupsen.

This commit is contained in:
Ludovic Fernandez 2018-01-22 12:16:03 +01:00 committed by Traefiker
parent c134dcd6fe
commit fb4ba7af2b
684 changed files with 92394 additions and 33943 deletions

View file

@ -7,6 +7,8 @@ package docker
import (
"fmt"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
)
@ -53,12 +55,13 @@ type APIClient interface {
// NewProjectFromEnv creates a project with a client that is build from environment variables.
func NewProjectFromEnv() (*Project, error) {
client, err := client.NewEnvClient()
cli, err := client.NewEnvClient()
if err != nil {
return nil, err
}
client.UpdateClientVersion(CurrentAPIVersion)
return NewProject(client), nil
ping := types.Ping{APIVersion: CurrentAPIVersion}
cli.NegotiateAPIVersionPing(ping)
return NewProject(cli), nil
}
// NewProject creates a project with the given client and the default attributes.