Пример #1
0
func (c *Container) Pull(done chan bool) {
	util.PrintGreen("Pulling", c.Image, "...")

	// prebuild type is deprecated
	if c.Type == "prebuild" {
		util.PrintRed("WARN: 'prebuild' type is deprecated, use 'index' instead")
	}

	docker.Pull(c.Image)

	done <- true
}
Пример #2
0
func (c *Container) Build(done chan bool) {
	buildName := "gaudi/" + c.Name
	buildPath := "/tmp/gaudi/" + c.Name

	if c.IsRemote() {
		// remote type is deprecated
		if c.Type == "remote" {
			util.PrintRed("WARN: 'remote' type is deprecated, use 'github' instead")
		}

		buildName = c.Image
		buildPath = c.Path
	}

	util.PrintGreen("Building", buildName, "...")
	docker.Build(buildName, buildPath)

	done <- true
}