| 433 | |
| 434 | |
| 435 | Future<Nothing> DockerContainerizerProcess::pull( |
| 436 | const ContainerID& containerId) |
| 437 | { |
| 438 | if (!containers_.contains(containerId)) { |
| 439 | return Failure("Container is already destroyed"); |
| 440 | } |
| 441 | |
| 442 | Container* container = containers_.at(containerId); |
| 443 | container->state = Container::PULLING; |
| 444 | |
| 445 | string image = container->image(); |
| 446 | |
| 447 | Future<Docker::Image> future = metrics.image_pull.time(docker->pull( |
| 448 | container->containerWorkDir, |
| 449 | image, |
| 450 | container->forcePullImage())); |
| 451 | |
| 452 | containers_.at(containerId)->pull = future; |
| 453 | |
| 454 | return future.then(defer(self(), [=]() { |
| 455 | VLOG(1) << "Docker pull " << image << " completed"; |
| 456 | return Nothing(); |
| 457 | })); |
| 458 | } |
| 459 | |
| 460 | |
| 461 | Try<Nothing> DockerContainerizerProcess::updatePersistentVolumes( |