tools

package
v0.26.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2017 License: MIT Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatFileInDockerImage

func CatFileInDockerImage(c *client.Client, imageName, fileName string) ([]byte, error)

CatFileInDockerImage reads the file fileName inside the given image

func GetDockerCompose

func GetDockerCompose(dockerComposePath string) (result types.DockerCompose, err error)

GetDockerCompose reads docker-compose.yml at the given path and returns the dockerCompose object

func GetRenderedVolumes

func GetRenderedVolumes(volumes []string, appName string, role string, homeDir string) ([]string, error)

GetRenderedVolumes returns the rendered paths to the given volumes

func ListImages

func ListImages(c *client.Client) ([]string, error)

ListImages returns the names of all images and an error (if any)

func ListRunningContainers

func ListRunningContainers(c *client.Client) ([]string, error)

ListRunningContainers returns the names of running containers and an error (if any)

func PullImage

func PullImage(c *client.Client, image string) error

PullImage pulls the given image from DockerHub, returns an error if any

func PushImage

func PushImage(c *client.Client, imageName, encodedAuth string) error

PushImage pushes image with imageName to the registry given an encoded auth object

func RunInDockerImage

func RunInDockerImage(imageName, command string) (string, error)

RunInDockerImage runs the given command in a new writeable container layer over the given image, removes the container when the command exits, and returns the output string and an error if any

func TagImage

func TagImage(c *client.Client, srcImage, targetImage string) error

TagImage tags a docker image srcImage as targetImage

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL