示例#1
0
func Pull(image string) string {
	cmd.EchoAll("docker", "pull", image)
	var i []Image
	cmd.JSON(&i, "docker", "inspect", image)
	if len(i) == 0 {
		cli.Fatalf("image missing after pull: %s", image)
	}
	if len(i) != 1 {
		cli.Fatalf("multiple images match %s; ensure sous is using unique tags", image)
	}
	return i[0].ID
}
示例#2
0
func Push(tag string) {
	cmd.EchoAll("docker", "push", tag)
}