diff --git a/rootfs_ops.go b/rootfs_ops.go index 2347817..7c9b436 100644 --- a/rootfs_ops.go +++ b/rootfs_ops.go @@ -3,7 +3,9 @@ package main import ( "bytes" "encoding/base64" + "io/ioutil" "os" + "path/filepath" "github.com/docker/docker/pkg/archive" "github.com/opencontainers/runtime-spec/specs-go" @@ -24,5 +26,10 @@ func unpackRootfs(spec *specs.Spec) error { return err } + // write a resolv.conf + if err := ioutil.WriteFile(filepath.Join(defaultRootfsDir, "etc", "resolv.conf"), []byte("nameserver 8.8.8.8\nnameserver 8.8.4.4"), 0755); err != nil { + return err + } + return nil }