func (task *Task) getDockerResources(container *apicontainer.Container) dockercontainer.Resources {
	// Convert MB to B and set Memory
	dockerMem := int64(container.Memory * 1024 * 1024)
	if dockerMem != 0 && dockerMem < apicontainer.DockerContainerMinimumMemoryInBytes {
		seelog.Warnf("Task %s container %s memory setting is too low, increasing to %d bytes",
			task.Arn, container.Name, apicontainer.DockerContainerMinimumMemoryInBytes)
		dockerMem = apicontainer.DockerContainerMinimumMemoryInBytes
	}
	// Set CPUShares
	cpuShare := task.dockerCPUShares(container.CPU)
	resources := dockercontainer.Resources{
		Memory:    dockerMem,
		CPUShares: cpuShare,
	}
	return resources
}
func (task *Task) getDockerResources(container *apicontainer.Container) dockercontainer.Resources {
	
	dockerMem := int64(container.Memory * 1024 * 1024)
	if dockerMem != 0 && dockerMem < apicontainer.DockerContainerMinimumMemoryInBytes {
		seelog.Warnf("Task %s container %s memory setting is too low, increasing to %d bytes",
			task.Arn, container.Name, apicontainer.DockerContainerMinimumMemoryInBytes)
		dockerMem = apicontainer.DockerContainerMinimumMemoryInBytes
	}
	
	cpuShare := task.dockerCPUShares(container.CPU)
	resources := dockercontainer.Resources{
		Memory:    dockerMem,
		CPUShares: cpuShare,
	}
	return resources
}
func ( task * Task ) getDockerResources ( container * apicontainer . Container ) dockercontainer . Resources { // Convert MB to B and set Memory dockerMem := int64 ( container . Memory * 1024 * 1024 ) if dockerMem != 0 && dockerMem < apicontainer . DockerContainerMinimumMemoryInBytes { seelog . Warnf ( " " , task . Arn , container . Name , apicontainer . DockerContainerMinimumMemoryInBytes ) dockerMem = apicontainer . DockerContainerMinimumMemoryInBytes } // Set CPUShares cpuShare := task . dockerCPUShares ( container . CPU ) resources := dockercontainer . Resources { Memory : dockerMem , CPUShares : cpuShare , } return resources }
// Requires an *apicontainer.Container and returns the Resources for the HostConfig struct
Requires an * apicontainer . Container and returns the Resources for the HostConfig struct