// CreateContainer creates a new container in specified PodSandbox
CreateContainer creates a new container in specified PodSandbox
// CreateContainer creates a new container in specified PodSandbox
func (h *Runtime) CreateContainer(podSandboxID string, config *kubeapi.ContainerConfig, sandboxConfig *kubeapi.PodSandboxConfig) (string, error) {
	containerSpec, err := buildUserContainer(config, sandboxConfig)
	if err != nil {
		glog.Errorf("Build UserContainer for container %q failed: %v", config.String(), err)
		return "", err
	}
	containerID, err := h.client.CreateContainer(podSandboxID, containerSpec)
	if err != nil {
		glog.Errorf("Create container %s in pod %s failed: %v", config.Metadata.Name, podSandboxID, err)
		return "", err
	}
	return containerID, nil
}
func ( h * Runtime ) CreateContainer ( podSandboxID string , config * kubeapi . ContainerConfig , sandboxConfig * kubeapi . PodSandboxConfig ) ( string , error ) { containerSpec , err := buildUserContainer ( config , sandboxConfig ) if err != nil { glog . Errorf ( " " , config . String ( ) , err ) return " " , err } containerID , err := h . client . CreateContainer ( podSandboxID , containerSpec ) if err != nil { glog . Errorf ( " " , config . Metadata . Name , podSandboxID , err ) return " " , err } return containerID , nil }
CreateContainer creates a new container in specified PodSandbox
CreateContainer creates a new container in specified PodSandbox