func handleDockerContainer()

in cleanup.go [263:286]


func handleDockerContainer(client DockerClient, container *docker.Container) {
	logrus.Debugln("handleDockerContainer", container.Name, container.ID, container.Image, container.State.Running)

	handleDockerImageID(client, container.Image)

	if isCacheContainer(container.Name) {
		if cache, ok := cachesUsed[container.ID]; ok {
			cache.mark(opts.DefaultTTL)
			cachesUsed[container.ID] = cache
		}
		return
	}

	for _, otherContainer := range container.HostConfig.VolumesFrom {
		handleDockerContainerID(client, otherContainer)
	}
	for _, otherContainer := range container.HostConfig.Links {
		containerAndAlias := strings.SplitN(otherContainer, ":", 2)
		if len(containerAndAlias) < 1 {
			continue
		}
		handleDockerContainerID(client, containerAndAlias[0])
	}
}