Migrate Sirupsen to sirupsen.
This commit is contained in:
parent
c134dcd6fe
commit
fb4ba7af2b
684 changed files with 92394 additions and 33943 deletions
9
vendor/github.com/libkermit/docker/docker.go
generated
vendored
9
vendor/github.com/libkermit/docker/docker.go
generated
vendored
|
@ -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.
|
||||
|
|
2
vendor/github.com/libkermit/docker/image.go
generated
vendored
2
vendor/github.com/libkermit/docker/image.go
generated
vendored
|
@ -19,7 +19,7 @@ func (p *Project) ensureImageExists(ref string, force bool) error {
|
|||
if !force {
|
||||
// Check if ref is already there
|
||||
_, _, err := p.Client.ImageInspectWithRaw(context.Background(), ref)
|
||||
if err != nil && !client.IsErrImageNotFound(err) {
|
||||
if err != nil && !client.IsErrNotFound(err) {
|
||||
return err
|
||||
}
|
||||
if err == nil {
|
||||
|
|
7
vendor/github.com/libkermit/docker/remove.go
generated
vendored
7
vendor/github.com/libkermit/docker/remove.go
generated
vendored
|
@ -8,10 +8,7 @@ import (
|
|||
|
||||
// Remove removes the container
|
||||
func (p *Project) Remove(containerID string) error {
|
||||
if err := p.Client.ContainerRemove(context.Background(), containerID, types.ContainerRemoveOptions{
|
||||
return p.Client.ContainerRemove(context.Background(), containerID, types.ContainerRemoveOptions{
|
||||
Force: true,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
|
5
vendor/github.com/libkermit/docker/stop.go
generated
vendored
5
vendor/github.com/libkermit/docker/stop.go
generated
vendored
|
@ -14,9 +14,6 @@ func (p *Project) Stop(containerID string) error {
|
|||
// StopWithTimeout stops the container with the specified timeout.
|
||||
func (p *Project) StopWithTimeout(containerID string, timeout int) error {
|
||||
timeoutDuration := time.Duration(timeout) * time.Second
|
||||
if err := p.Client.ContainerStop(context.Background(), containerID, &timeoutDuration); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return p.Client.ContainerStop(context.Background(), containerID, &timeoutDuration)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue