mirror of
https://github.com/containers/podman.git
synced 2025-10-16 10:43:52 +08:00
API handler: don't force the CompatVolumes flag
Don't force the CompatVolumes option one way or another when the client doesn't specifically request one or the other, so that the server can choose to use its default behavior. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:

committed by
tomsweeneyredhat

parent
db2baee9fa
commit
55f4d2aa25
@ -302,6 +302,11 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
compression := archive.Compression(query.Compression)
|
||||
|
||||
var compatVolumes types.OptionalBool
|
||||
if _, found := r.URL.Query()["compatvolumes"]; found {
|
||||
compatVolumes = types.NewOptionalBool(query.CompatVolumes)
|
||||
}
|
||||
|
||||
// convert dropcaps formats
|
||||
var dropCaps = []string{}
|
||||
if _, found := r.URL.Query()["dropcaps"]; found {
|
||||
@ -742,7 +747,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
|
||||
Secrets: secrets,
|
||||
Volumes: query.Volumes,
|
||||
},
|
||||
CompatVolumes: types.NewOptionalBool(query.CompatVolumes),
|
||||
CompatVolumes: compatVolumes,
|
||||
CreatedAnnotation: query.CreatedAnnotation,
|
||||
Compression: compression,
|
||||
ConfigureNetwork: parseNetworkConfigurationPolicy(query.ConfigureNetwork),
|
||||
|
Reference in New Issue
Block a user