summaryrefslogtreecommitdiff
path: root/pkg/api/server/register_images.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-23 09:12:04 -0500
committerBrent Baude <bbaude@redhat.com>2020-03-23 14:14:17 -0500
commit12e78155e1c119f0073a4c3e13486600897cadca (patch)
tree83f079048c6ca0507ff02089465464147e6ed3a1 /pkg/api/server/register_images.go
parent48b3143656bde2163025d43a8a9b2c88208ffee8 (diff)
downloadpodman-12e78155e1c119f0073a4c3e13486600897cadca.tar.gz
podman-12e78155e1c119f0073a4c3e13486600897cadca.tar.bz2
podman-12e78155e1c119f0073a4c3e13486600897cadca.zip
apiv2 container commit for libpod
add an endpoint for a libpod specific commit. add the abilility to define the format. also update documentation accordingly. Fixes: #5586 Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/api/server/register_images.go')
-rw-r--r--pkg/api/server/register_images.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go
index e6ad045a2..87ddf5add 100644
--- a/pkg/api/server/register_images.go
+++ b/pkg/api/server/register_images.go
@@ -978,6 +978,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// name: container
// type: string
// description: the name or ID of a container
+ // required: true
// - in: query
// name: repo
// type: string
@@ -1000,8 +1001,14 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: pause the container before committing it
// - in: query
// name: changes
+ // description: instructions to apply while committing in Dockerfile format (i.e. "CMD=/bin/foo")
+ // type: array
+ // items:
+ // type: string
+ // - in: query
+ // name: format
// type: string
- // description: instructions to apply while committing in Dockerfile format
+ // description: format of the image manifest and metadata (default "oci")
// produces:
// - application/json
// responses:
@@ -1011,6 +1018,6 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// $ref: '#/responses/NoSuchImage'
// 500:
// $ref: '#/responses/InternalError'
- r.Handle(VersionedPath("/commit"), s.APIHandler(compat.CommitContainer)).Methods(http.MethodPost)
+ r.Handle(VersionedPath("/libpod/commit"), s.APIHandler(libpod.CommitContainer)).Methods(http.MethodPost)
return nil
}