summaryrefslogtreecommitdiff
path: root/pkg/api/server/register_images.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-07 14:16:43 +0100
committerGitHub <noreply@github.com>2020-03-07 14:16:43 +0100
commitc8de26fb0835bb3572af250088d4f66a3162ccd0 (patch)
tree9fa5f0d4b6f2591b5809dd23d0349d984f630db7 /pkg/api/server/register_images.go
parent43bf4f6626cc25ab839d989c025771de4669f86b (diff)
parent8b5e2a6297e6f6a5426551d1648278906a9d23de (diff)
downloadpodman-c8de26fb0835bb3572af250088d4f66a3162ccd0.tar.gz
podman-c8de26fb0835bb3572af250088d4f66a3162ccd0.tar.bz2
podman-c8de26fb0835bb3572af250088d4f66a3162ccd0.zip
Merge pull request #5374 from baude/create
add default network for apiv2 create
Diffstat (limited to 'pkg/api/server/register_images.go')
-rw-r--r--pkg/api/server/register_images.go46
1 files changed, 45 insertions, 1 deletions
diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go
index 622d8f421..8c75c4d04 100644
--- a/pkg/api/server/register_images.go
+++ b/pkg/api/server/register_images.go
@@ -968,6 +968,50 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 500:
// $ref: '#/responses/InternalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/tag"), s.APIHandler(handlers.TagImage)).Methods(http.MethodPost)
-
+ // swagger:operation POST /commit libpod libpodCommitContainer
+ // ---
+ // tags:
+ // - containers
+ // summary: Commit
+ // description: Create a new image from a container
+ // parameters:
+ // - in: query
+ // name: container
+ // type: string
+ // description: the name or ID of a container
+ // - in: query
+ // name: repo
+ // type: string
+ // description: the repository name for the created image
+ // - in: query
+ // name: tag
+ // type: string
+ // description: tag name for the created image
+ // - in: query
+ // name: comment
+ // type: string
+ // description: commit message
+ // - in: query
+ // name: author
+ // type: string
+ // description: author of the image
+ // - in: query
+ // name: pause
+ // type: boolean
+ // description: pause the container before committing it
+ // - in: query
+ // name: changes
+ // type: string
+ // description: instructions to apply while committing in Dockerfile format
+ // produces:
+ // - application/json
+ // responses:
+ // 201:
+ // description: no error
+ // 404:
+ // $ref: '#/responses/NoSuchImage'
+ // 500:
+ // $ref: '#/responses/InternalError'
+ r.Handle(VersionedPath("/commit"), s.APIHandler(generic.CommitContainer)).Methods(http.MethodPost)
return nil
}