summaryrefslogtreecommitdiff
path: root/pkg/bindings/images
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-03-02 15:44:45 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-03-07 08:08:32 -0500
commit326f3eda313606bcf28f413b5e6cdbd02ce2586b (patch)
treee9261d9cb37039e44669500bacf072092a8f4124 /pkg/bindings/images
parent01ffe2c30ae7bcd83e5556dfdf2d657e6a4539c2 (diff)
downloadpodman-326f3eda313606bcf28f413b5e6cdbd02ce2586b.tar.gz
podman-326f3eda313606bcf28f413b5e6cdbd02ce2586b.tar.bz2
podman-326f3eda313606bcf28f413b5e6cdbd02ce2586b.zip
Handle podman build --dns-search
Fixes: https://github.com/containers/podman/issues/9574 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/bindings/images')
-rw-r--r--pkg/bindings/images/build.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go
index 27706fd2c..1cbd28c37 100644
--- a/pkg/bindings/images/build.go
+++ b/pkg/bindings/images/build.go
@@ -87,6 +87,28 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
params.Add("devices", d)
}
+ if dnsservers := options.CommonBuildOpts.DNSServers; len(dnsservers) > 0 {
+ c, err := jsoniter.MarshalToString(dnsservers)
+ if err != nil {
+ return nil, err
+ }
+ params.Add("dnsservers", c)
+ }
+ if dnsoptions := options.CommonBuildOpts.DNSOptions; len(dnsoptions) > 0 {
+ c, err := jsoniter.MarshalToString(dnsoptions)
+ if err != nil {
+ return nil, err
+ }
+ params.Add("dnsoptions", c)
+ }
+ if dnssearch := options.CommonBuildOpts.DNSSearch; len(dnssearch) > 0 {
+ c, err := jsoniter.MarshalToString(dnssearch)
+ if err != nil {
+ return nil, err
+ }
+ params.Add("dnssearch", c)
+ }
+
if caps := options.DropCapabilities; len(caps) > 0 {
c, err := jsoniter.MarshalToString(caps)
if err != nil {