Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2909eb8

Browse files
committed
Fix an ability to make a new image from container (commit method).
1 parent 5d2a65b commit 2909eb8

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

docker-swagger.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3043,6 +3043,13 @@
30433043
"in": "query",
30443044
"description": "Dockerfile instructions to apply while committing",
30453045
"type": "string"
3046+
}, {
3047+
"name": "Content-Type",
3048+
"required": true,
3049+
"in": "header",
3050+
"type": "string",
3051+
"default": "application/json",
3052+
"description": "Content Type of input"
30463053
}],
30473054
"tags": [
30483055
"Image"

generated/Resource/ImageResource.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ public function search($parameters = [], $fetch = self::FETCH_OBJECT)
334334
* @var string $author author (e.g., “John Hannibal Smith <[email protected]>“)
335335
* @var string $pause 1/True/true or 0/False/false, whether to pause the container before committing
336336
* @var string $changes Dockerfile instructions to apply while committing
337+
* @var string $Content-Type Content Type of input
337338
* }
338339
*
339340
* @param string $fetch Fetch mode (object or response)
@@ -350,6 +351,8 @@ public function commit(\Docker\API\Model\ContainerConfig $containerConfig, $para
350351
$queryParam->setDefault('author', null);
351352
$queryParam->setDefault('pause', null);
352353
$queryParam->setDefault('changes', null);
354+
$queryParam->setDefault('Content-Type', 'application/json');
355+
$queryParam->setHeaderParameters(['Content-Type']);
353356
$url = '/commit';
354357
$url = $url . ('?' . $queryParam->buildQueryString($parameters));
355358
$headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters));

0 commit comments

Comments
 (0)