We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17fe47d commit a316b10Copy full SHA for a316b10
pkg/chrootarchive/archive.go
@@ -4,13 +4,22 @@ import (
4
"fmt"
5
"io"
6
"io/ioutil"
7
+ "net"
8
"os"
9
+ "os/user"
10
"path/filepath"
11
12
"github.com/docker/docker/pkg/archive"
13
"github.com/docker/docker/pkg/idtools"
14
)
15
16
+func init() {
17
+ // initialize nss libraries in Glibc so that the dynamic libraries are loaded in the host
18
+ // environment not in the chroot from untrusted files.
19
+ _, _ = user.Lookup("docker")
20
+ _, _ = net.LookupHost("localhost")
21
+}
22
+
23
// NewArchiver returns a new Archiver which uses chrootarchive.Untar
24
func NewArchiver(idMapping *idtools.IdentityMapping) *archive.Archiver {
25
if idMapping == nil {
0 commit comments