summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r--pkg/api/handlers/compat/containers_start.go2
-rw-r--r--pkg/api/handlers/compat/images_build.go12
2 files changed, 13 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/containers_start.go b/pkg/api/handlers/compat/containers_start.go
index 391aa752d..f1ed1b2b8 100644
--- a/pkg/api/handlers/compat/containers_start.go
+++ b/pkg/api/handlers/compat/containers_start.go
@@ -42,7 +42,7 @@ func StartContainer(w http.ResponseWriter, r *http.Request) {
utils.WriteResponse(w, http.StatusNotModified, nil)
return
}
- if err := con.Start(r.Context(), len(con.PodID()) > 0); err != nil {
+ if err := con.Start(r.Context(), true); err != nil {
utils.InternalServerError(w, err)
return
}
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index ab92434b1..700881926 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -15,6 +15,7 @@ import (
"github.com/containers/buildah"
buildahDefine "github.com/containers/buildah/define"
+ "github.com/containers/buildah/pkg/parse"
"github.com/containers/buildah/util"
"github.com/containers/image/v5/types"
"github.com/containers/podman/v3/libpod"
@@ -445,6 +446,17 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
},
}
+ if len(query.Platform) > 0 {
+ variant := ""
+ buildOptions.OS, buildOptions.Architecture, variant, err = parse.Platform(query.Platform)
+ if err != nil {
+ utils.BadRequest(w, "platform", query.Platform, err)
+ return
+ }
+ buildOptions.SystemContext.OSChoice = buildOptions.OS
+ buildOptions.SystemContext.ArchitectureChoice = buildOptions.Architecture
+ buildOptions.SystemContext.VariantChoice = variant
+ }
if _, found := r.URL.Query()["timestamp"]; found {
ts := time.Unix(query.Timestamp, 0)
buildOptions.Timestamp = &ts