Documentation ¶
Index ¶
- Constants
- Variables
- func AWSAuthConfig(awsClient *aws.Client) (string, error)
- func CheckImageAccessible(dockerClient *Client, dockerImage, authConfig string, ...) error
- func CheckImageExistsLocally(dockerClient *Client, dockerImage string) error
- func CopyFromContainer(containerID string, containerPath string, localDir string) error
- func CopyToContainer(containerID string, input *archive.Input, containerPath string) error
- func EncodeAuthConfig(authConfig dockertypes.AuthConfig) (string, error)
- func ErrorConnectToDockerDaemon() error
- func ErrorDockerPermissions(err error) error
- func ErrorImageDoesntExistLocally(image string) error
- func ErrorImageInaccessible(image string, cause error) error
- func ExtractImageTag(dockerImage string) string
- func PullImage(image string, encodedAuthConfig string, pullVerbosity PullVerbosity) (bool, error)
- func StreamDockerLogs(containerID string, containerIDs ...string) error
- func StreamDockerLogsFn(containerID string, dockerClient *Client) func() error
- func WrapDockerError(err error) error
- type Client
- type PullVerbosity
Constants ¶
View Source
const ( ErrConnectToDockerDaemon = "docker.connect_to_docker_daemon" ErrDockerPermissions = "docker.docker_permissions" ErrImageDoesntExistLocally = "docker.image_doesnt_exist_locally" ErrImageInaccessible = "docker.image_inaccessible" )
Variables ¶
View Source
var NoAuth string
Functions ¶
func CheckImageAccessible ¶
func CheckImageAccessible(dockerClient *Client, dockerImage, authConfig string, providerType types.ProviderType) error
func CheckImageExistsLocally ¶ added in v0.21.0
func CopyFromContainer ¶ added in v0.20.0
The file or directory name of containerPath will be preserved in localDir For example, if the container has /aaa/zzz.txt,
- CopyFromContainer(_, "/aaa", "~/test") will create "~/test/aaa/zzz.txt"
- CopyFromContainer(_, "/aaa/zzz.txt", "~/test") will create "~/test/zzz.txt"
func CopyToContainer ¶ added in v0.20.0
The provided input will be extracted into the container's containerPath directory
func EncodeAuthConfig ¶
func EncodeAuthConfig(authConfig dockertypes.AuthConfig) (string, error)
func ErrorConnectToDockerDaemon ¶
func ErrorConnectToDockerDaemon() error
func ErrorDockerPermissions ¶
func ErrorImageDoesntExistLocally ¶ added in v0.21.0
func ErrorImageInaccessible ¶
func ExtractImageTag ¶ added in v0.18.0
func PullImage ¶
func PullImage(image string, encodedAuthConfig string, pullVerbosity PullVerbosity) (bool, error)
func StreamDockerLogs ¶
func StreamDockerLogsFn ¶
func WrapDockerError ¶
Types ¶
type Client ¶
type Client struct { *dockerclient.Client Info dockertypes.Info }
func GetDockerClient ¶
func MustDockerClient ¶
func MustDockerClient() *Client
type PullVerbosity ¶
type PullVerbosity int
const ( NoPrint PullVerbosity = iota PrintDots PrintProgressBars )
Click to show internal directories.
Click to hide internal directories.