You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# we need to re-inject /etc/hosts into the end result!
75
+
# (otherwise things like https://github.com/kubernetes/kube-openapi/blob/f0e62f92d13f418e2732b21c952fd17cab771c75/pkg/validation/validate/jsonschema_test.go#L109 result in "panic: listen tcp: lookup localhost on 172.17.0.1:53: no such host")
76
+
mkdir "$dir/tianon-fake-etc"
77
+
echo'from-docker'>"$dir/tianon-fake-etc/hostname"
78
+
cat >"$dir/tianon-fake-etc/hosts"<<-'EOF'
79
+
127.0.0.1 localhost
80
+
127.0.1.1 from-docker
81
+
::1 localhost ip6-localhost ip6-loopback
82
+
ff02::1 ip6-allnodes
83
+
ff02::2 ip6-allrouters
84
+
EOF
85
+
cat >"$dir/tianon-fake-etc/resolv.conf"<<-'EOF'
86
+
# https://1.1.1.1 (privacy-focused, highly-available DNS service)
# TODO we need to re-inject /etc/hosts into the end result!
77
-
# (otherwise things like https://github.com/kubernetes/kube-openapi/blob/f0e62f92d13f418e2732b21c952fd17cab771c75/pkg/validation/validate/jsonschema_test.go#L109 result in "panic: listen tcp: lookup localhost on 172.17.0.1:53: no such host")
78
-
79
95
# since we already assumed the current Docker host can successfully run the image's binaries, we'll use that here
0 commit comments