def run(self, container, input_data=None, warm=False):
if warm:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>image_name = container.image<EOL>is_image_local = self.has_image(image_name)<EOL>if (is_image_local and self.skip_pull_image) or image_name.startswith('<STR_LIT>'):<EOL><INDENT>LOG.info("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>self.pull_image(image_name)<EOL><DEDENT>except DockerImagePullFailedException:<EOL><INDENT>if not is_image_local:<EOL><INDENT>raise DockerImagePullFailedException(<EOL>"<STR_LIT>".format(image_name))<EOL><DEDENT>LOG.info(<EOL>"<STR_LIT>", image_name)<EOL><DEDENT><DEDENT>if not container.is_created():<EOL><INDENT>container.network_id = self.docker_network_id<EOL>container.create()<EOL><DEDENT>container.start(input_data=input_data)<EOL>
Create and run a Docker container based on the given configuration.

:param samcli.local.docker.container.Container container: Container to create and run
:param input_data: Optional. Input data sent to the container through container's stdin.
:param bool warm: Indicates if an existing container can be reused. Defaults False ie. a new container will
    be created for every request.
:raises DockerImagePullFailedException: If the Docker image was not available in the server