| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 43 | public function build(ContextInterface $context, $name, $parameters = []) |
||
| 44 | {
|
||
| 45 | $stream = $this->streamFactory->createStream($context->read()); |
||
| 46 | $buildResponse = $this->imageManager->build($stream, array_merge($parameters, [ |
||
| 47 | 't' => $name, |
||
| 48 | 'q' => 'false' |
||
| 49 | ]), ImageManager::FETCH_RESPONSE); |
||
| 50 | |||
| 51 | if (200 !== $buildResponse->getStatusCode()) {
|
||
| 52 | throw new DockerException(sprintf('Build failed with status code %s', $buildResponse->getStatusCode()));
|
||
| 53 | } |
||
| 54 | |||
| 55 | return new BuildStream($buildResponse->getBody()); |
||
| 56 | } |
||
| 57 | } |
||
| 58 |