Add support for volumes-from, image volumes, init

This should complete Podmanv2's support for volume-related flags.
Most code was sourced from the old pkg/spec implementation with
modifications to account for the split between frontend flags
(volume, mount, tmpfs) and the backend flags implemented here.

Also enables tests for podman run with volumes

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon
2020-04-27 10:36:41 -04:00
parent ca1c674d2e
commit 02671a103f
9 changed files with 375 additions and 38 deletions

View File

@ -1,6 +1,7 @@
package libpod
import (
"context"
"encoding/json"
"net/http"
@ -26,7 +27,7 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) {
utils.InternalServerError(w, err)
return
}
ctr, err := generate.MakeContainer(runtime, &sg)
ctr, err := generate.MakeContainer(context.Background(), runtime, &sg)
if err != nil {
utils.InternalServerError(w, err)
return