summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-08 10:07:54 -0500
committerGitHub <noreply@github.com>2021-03-08 10:07:54 -0500
commitb6079bcf4af26c9e0f9c0438d8aabd3ed78f7914 (patch)
tree122f2480b9f9bc43709d077f1f8f8b78ed271c23 /pkg/api/handlers/compat
parentbbb9d9b0781b06e189406cee95a64a415f9ed577 (diff)
parent9e75cafd5cd9b530d8fadb0a25b9c99836d80e40 (diff)
downloadpodman-b6079bcf4af26c9e0f9c0438d8aabd3ed78f7914.tar.gz
podman-b6079bcf4af26c9e0f9c0438d8aabd3ed78f7914.tar.bz2
podman-b6079bcf4af26c9e0f9c0438d8aabd3ed78f7914.zip
Merge pull request #9592 from rhatdan/timestamp
Numerous buildah fixes found by Ed's testing of buildah tests against podman.
Diffstat (limited to 'pkg/api/handlers/compat')
-rw-r--r--pkg/api/handlers/compat/images_build.go36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index e06f93b89..392f688dd 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -77,6 +77,9 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
Devices string `schema:"devices"`
Dockerfile string `schema:"dockerfile"`
DropCapabilities string `schema:"dropcaps"`
+ DNSServers string `schema:"dnsservers"`
+ DNSOptions string `schema:"dnsoptions"`
+ DNSSearch string `schema:"dnssearch"`
Excludes string `schema:"excludes"`
ForceRm bool `schema:"forcerm"`
From string `schema:"from"`
@@ -160,6 +163,36 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
devices = m
}
+ var dnsservers = []string{}
+ if _, found := r.URL.Query()["dnsservers"]; found {
+ var m = []string{}
+ if err := json.Unmarshal([]byte(query.DNSServers), &m); err != nil {
+ utils.BadRequest(w, "dnsservers", query.DNSServers, err)
+ return
+ }
+ dnsservers = m
+ }
+
+ var dnsoptions = []string{}
+ if _, found := r.URL.Query()["dnsoptions"]; found {
+ var m = []string{}
+ if err := json.Unmarshal([]byte(query.DNSOptions), &m); err != nil {
+ utils.BadRequest(w, "dnsoptions", query.DNSOptions, err)
+ return
+ }
+ dnsoptions = m
+ }
+
+ var dnssearch = []string{}
+ if _, found := r.URL.Query()["dnssearch"]; found {
+ var m = []string{}
+ if err := json.Unmarshal([]byte(query.DNSSearch), &m); err != nil {
+ utils.BadRequest(w, "dnssearches", query.DNSSearch, err)
+ return
+ }
+ dnssearch = m
+ }
+
var output string
if len(query.Tag) > 0 {
output = query.Tag[0]
@@ -285,6 +318,9 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
CPUQuota: query.CpuQuota,
CPUShares: query.CpuShares,
CPUSetCPUs: query.CpuSetCpus,
+ DNSServers: dnsservers,
+ DNSOptions: dnsoptions,
+ DNSSearch: dnssearch,
HTTPProxy: query.HTTPProxy,
Memory: query.Memory,
MemorySwap: query.MemSwap,