Last active
September 21, 2020 08:28
-
-
Save tnk4on/46e48ba2289918059b65f57fab5bfe84 to your computer and use it in GitHub Desktop.
CRC(CodeReady Containers) for Mac runs a DNS server for name resolution in the CRC VM on hyperkit. The DNS server is run as a container by Podman and starts dnsmasq. On the Mac, *.testing domain name resolution is directed to the CRC VM by "/etc/resolver".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ export CRC_IP=$(crc ip) | |
$ ssh -i ~/.crc/machines/crc/id_rsa core@$CRC_IP | |
[core@crc-zqfk6-master-0 ~]$ sudo podman inspect dnsmasq | |
[ | |
{ | |
"Id": "ed3a4be3023326f4b639f373913d87391cb28747f9fdffa8ff544ca908dc720f", | |
"Created": "2020-09-20T06:28:57.900735714Z", | |
"Path": "/usr/sbin/dnsmasq", | |
"Args": [ | |
"--keep-in-foreground" | |
], | |
"State": { | |
"OciVersion": "1.0.1-dev", | |
"Status": "running", | |
"Running": true, | |
"Paused": false, | |
"Restarting": false, | |
"OOMKilled": false, | |
"Dead": false, | |
"Pid": 2012, | |
"ConmonPid": 2000, | |
"ExitCode": 0, | |
"Error": "", | |
"StartedAt": "2020-09-20T06:28:58.53765477Z", | |
"FinishedAt": "0001-01-01T00:00:00Z", | |
"Healthcheck": { | |
"Status": "", | |
"FailingStreak": 0, | |
"Log": null | |
} | |
}, | |
"Image": "72e07c0aff7be53b9e5051f1d22f8d4400083ac328e6f138bc2d6a239b55ba38", | |
"ImageName": "quay.io/crcont/dnsmasq:latest", | |
"Rootfs": "", | |
"Pod": "", | |
"ResolvConfPath": "/var/run/containers/storage/overlay-containers/ed3a4be3023326f4b639f373913d87391cb28747f9fdffa8ff544ca908dc720f/userdata/resolv.conf", | |
"HostnamePath": "/var/run/containers/storage/overlay-containers/ed3a4be3023326f4b639f373913d87391cb28747f9fdffa8ff544ca908dc720f/userdata/hostname", | |
"HostsPath": "/var/run/containers/storage/overlay-containers/ed3a4be3023326f4b639f373913d87391cb28747f9fdffa8ff544ca908dc720f/userdata/hosts", | |
"StaticDir": "/var/lib/containers/storage/overlay-containers/ed3a4be3023326f4b639f373913d87391cb28747f9fdffa8ff544ca908dc720f/userdata", | |
"OCIConfigPath": "/var/lib/containers/storage/overlay-containers/ed3a4be3023326f4b639f373913d87391cb28747f9fdffa8ff544ca908dc720f/userdata/config.json", | |
"OCIRuntime": "runc", | |
"LogPath": "/var/lib/containers/storage/overlay-containers/ed3a4be3023326f4b639f373913d87391cb28747f9fdffa8ff544ca908dc720f/userdata/ctr.log", | |
"LogTag": "", | |
"ConmonPidFile": "/var/run/containers/storage/overlay-containers/ed3a4be3023326f4b639f373913d87391cb28747f9fdffa8ff544ca908dc720f/userdata/conmon.pid", | |
"Name": "dnsmasq", | |
"RestartCount": 0, | |
"Driver": "overlay", | |
"MountLabel": "system_u:object_r:container_file_t:s0:c18,c244", | |
"ProcessLabel": "", | |
"AppArmorProfile": "", | |
"EffectiveCaps": [ | |
"CAP_CHOWN", | |
"CAP_DAC_OVERRIDE", | |
"CAP_DAC_READ_SEARCH", | |
"CAP_FOWNER", | |
"CAP_FSETID", | |
"CAP_KILL", | |
"CAP_SETGID", | |
"CAP_SETUID", | |
"CAP_SETPCAP", | |
"CAP_LINUX_IMMUTABLE", | |
"CAP_NET_BIND_SERVICE", | |
"CAP_NET_BROADCAST", | |
"CAP_NET_ADMIN", | |
"CAP_NET_RAW", | |
"CAP_IPC_LOCK", | |
"CAP_IPC_OWNER", | |
"CAP_SYS_MODULE", | |
"CAP_SYS_RAWIO", | |
"CAP_SYS_CHROOT", | |
"CAP_SYS_PTRACE", | |
"CAP_SYS_PACCT", | |
"CAP_SYS_ADMIN", | |
"CAP_SYS_BOOT", | |
"CAP_SYS_NICE", | |
"CAP_SYS_RESOURCE", | |
"CAP_SYS_TIME", | |
"CAP_SYS_TTY_CONFIG", | |
"CAP_MKNOD", | |
"CAP_LEASE", | |
"CAP_AUDIT_WRITE", | |
"CAP_AUDIT_CONTROL", | |
"CAP_SETFCAP", | |
"CAP_MAC_OVERRIDE", | |
"CAP_MAC_ADMIN", | |
"CAP_SYSLOG", | |
"CAP_WAKE_ALARM", | |
"CAP_BLOCK_SUSPEND", | |
"CAP_AUDIT_READ" | |
], | |
"BoundingCaps": [ | |
"CAP_CHOWN", | |
"CAP_DAC_OVERRIDE", | |
"CAP_DAC_READ_SEARCH", | |
"CAP_FOWNER", | |
"CAP_FSETID", | |
"CAP_KILL", | |
"CAP_SETGID", | |
"CAP_SETUID", | |
"CAP_SETPCAP", | |
"CAP_LINUX_IMMUTABLE", | |
"CAP_NET_BIND_SERVICE", | |
"CAP_NET_BROADCAST", | |
"CAP_NET_ADMIN", | |
"CAP_NET_RAW", | |
"CAP_IPC_LOCK", | |
"CAP_IPC_OWNER", | |
"CAP_SYS_MODULE", | |
"CAP_SYS_RAWIO", | |
"CAP_SYS_CHROOT", | |
"CAP_SYS_PTRACE", | |
"CAP_SYS_PACCT", | |
"CAP_SYS_ADMIN", | |
"CAP_SYS_BOOT", | |
"CAP_SYS_NICE", | |
"CAP_SYS_RESOURCE", | |
"CAP_SYS_TIME", | |
"CAP_SYS_TTY_CONFIG", | |
"CAP_MKNOD", | |
"CAP_LEASE", | |
"CAP_AUDIT_WRITE", | |
"CAP_AUDIT_CONTROL", | |
"CAP_SETFCAP", | |
"CAP_MAC_OVERRIDE", | |
"CAP_MAC_ADMIN", | |
"CAP_SYSLOG", | |
"CAP_WAKE_ALARM", | |
"CAP_BLOCK_SUSPEND", | |
"CAP_AUDIT_READ" | |
], | |
"ExecIDs": [], | |
"GraphDriver": { | |
"Name": "overlay", | |
"Data": { | |
"LowerDir": "/var/lib/containers/storage/overlay/4ac1727d1865221c51c2a4800f7ffb635fb52df5bf7da2bd71b193b8ce3a8a80/diff:/var/lib/containers/storage/overlay/1d069c0b259b9ff82eacb6a799ec3a2ec62deb8b9b01390ff08c1e52f6ff24fd/diff:/var/lib/containers/storage/overlay/2cd36b90c1197b014515aed7321ddbcae4248053e135dd1f2049c4803aaed3c7/diff:/var/lib/containers/storage/overlay/f659bfaf2e3b922dcc39bb7e9011ea80508c21349fabb8d1ce2ea20525be349b/diff:/var/lib/containers/storage/overlay/1295eae54c9d95bd8e2c7f83df2a90ac3923d89ec44231fd49f31e7a934f9656/diff", | |
"MergedDir": "/var/lib/containers/storage/overlay/28d558acb7d357fc491c4f0c111d56291183eb953cddf8d193f38108952efc0b/merged", | |
"UpperDir": "/var/lib/containers/storage/overlay/28d558acb7d357fc491c4f0c111d56291183eb953cddf8d193f38108952efc0b/diff", | |
"WorkDir": "/var/lib/containers/storage/overlay/28d558acb7d357fc491c4f0c111d56291183eb953cddf8d193f38108952efc0b/work" | |
} | |
}, | |
"Mounts": [ | |
{ | |
"Type": "bind", | |
"Name": "", | |
"Source": "/var/srv/dnsmasq.conf", | |
"Destination": "/etc/dnsmasq.conf", | |
"Driver": "", | |
"Mode": "", | |
"Options": [ | |
"rbind" | |
], | |
"RW": true, | |
"Propagation": "rprivate" | |
} | |
], | |
"Dependencies": [], | |
"NetworkSettings": { | |
"EndpointID": "", | |
"Gateway": "10.88.0.1", | |
"IPAddress": "10.88.0.8", | |
"IPPrefixLen": 16, | |
"IPv6Gateway": "", | |
"GlobalIPv6Address": "", | |
"GlobalIPv6PrefixLen": 0, | |
"MacAddress": "42:a1:65:63:6f:b5", | |
"Bridge": "", | |
"SandboxID": "", | |
"HairpinMode": false, | |
"LinkLocalIPv6Address": "", | |
"LinkLocalIPv6PrefixLen": 0, | |
"Ports": [ | |
{ | |
"hostPort": 53, | |
"containerPort": 53, | |
"protocol": "udp", | |
"hostIP": "" | |
} | |
], | |
"SandboxKey": "/var/run/netns/cni-4c4436a1-f402-0c17-5d33-9a8ed5abe540" | |
}, | |
"ExitCommand": [ | |
"/usr/bin/podman", | |
"--root", | |
"/var/lib/containers/storage", | |
"--runroot", | |
"/var/run/containers/storage", | |
"--log-level", | |
"error", | |
"--cgroup-manager", | |
"systemd", | |
"--tmpdir", | |
"/var/run/libpod", | |
"--runtime", | |
"runc", | |
"--storage-driver", | |
"overlay", | |
"--events-backend", | |
"file", | |
"container", | |
"cleanup", | |
"ed3a4be3023326f4b639f373913d87391cb28747f9fdffa8ff544ca908dc720f" | |
], | |
"Namespace": "", | |
"IsInfra": false, | |
"Config": { | |
"Hostname": "ed3a4be30233", | |
"Domainname": "", | |
"User": "", | |
"AttachStdin": false, | |
"AttachStdout": false, | |
"AttachStderr": false, | |
"Tty": false, | |
"OpenStdin": false, | |
"StdinOnce": false, | |
"Env": [ | |
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", | |
"TERM=xterm", | |
"HOSTNAME=ed3a4be30233", | |
"container=oci", | |
"HOME=/root" | |
], | |
"Cmd": null, | |
"Image": "quay.io/crcont/dnsmasq:latest", | |
"Volumes": null, | |
"WorkingDir": "/", | |
"Entrypoint": "/usr/sbin/dnsmasq --keep-in-foreground", | |
"OnBuild": null, | |
"Labels": { | |
"architecture": "x86_64", | |
"authoritative-source-url": "registry.access.redhat.com", | |
"build-date": "2020-01-29T19:39:39.620378", | |
"com.redhat.build-host": "cpt-1002.osbs.prod.upshift.rdu2.redhat.com", | |
"com.redhat.component": "ubi8-container", | |
"com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI", | |
"description": "The Universal Base Image is designed and engineered to be the base layer for all of your containerized applications, middleware and utilities. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.", | |
"distribution-scope": "public", | |
"io.k8s.description": "The Universal Base Image is designed and engineered to be the base layer for all of your containerized applications, middleware and utilities. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.", | |
"io.k8s.display-name": "Red Hat Universal Base Image 8", | |
"io.openshift.expose-services": "", | |
"io.openshift.tags": "base rhel8", | |
"maintainer": "Red Hat, Inc.", | |
"name": "ubi8", | |
"release": "397", | |
"summary": "Provides the latest release of Red Hat Universal Base Image 8.", | |
"url": "https://access.redhat.com/containers/#/registry.access.redhat.com/ubi8/images/8.1-397", | |
"vcs-ref": "26f36bfa3e3a04c8c866b250924c1aefc34f01c9", | |
"vcs-type": "git", | |
"vendor": "Red Hat, Inc.", | |
"version": "8.1" | |
}, | |
"Annotations": { | |
"io.container.manager": "libpod", | |
"io.kubernetes.cri-o.Created": "2020-09-20T06:28:57.900735714Z", | |
"io.kubernetes.cri-o.TTY": "false", | |
"io.podman.annotations.autoremove": "FALSE", | |
"io.podman.annotations.init": "FALSE", | |
"io.podman.annotations.privileged": "TRUE", | |
"io.podman.annotations.publish-all": "FALSE", | |
"org.opencontainers.image.stopSignal": "15" | |
}, | |
"StopSignal": 15, | |
"CreateCommand": [ | |
"podman", | |
"run", | |
"--ip", | |
"10.88.0.8", | |
"--name", | |
"dnsmasq", | |
"-v", | |
"/var/srv/dnsmasq.conf:/etc/dnsmasq.conf", | |
"-p", | |
"53:53/udp", | |
"--privileged", | |
"-d", | |
"quay.io/crcont/dnsmasq:latest" | |
] | |
}, | |
"HostConfig": { | |
"Binds": [ | |
"/var/srv/dnsmasq.conf:/etc/dnsmasq.conf:rw,rprivate,rbind" | |
], | |
"ContainerIDFile": "", | |
"LogConfig": { | |
"Type": "k8s-file", | |
"Config": null | |
}, | |
"NetworkMode": "default", | |
"PortBindings": { | |
"53/udp": [ | |
{ | |
"HostIp": "", | |
"HostPort": "53" | |
} | |
] | |
}, | |
"RestartPolicy": { | |
"Name": "", | |
"MaximumRetryCount": 0 | |
}, | |
"AutoRemove": false, | |
"VolumeDriver": "", | |
"VolumesFrom": null, | |
"CapAdd": [], | |
"CapDrop": [], | |
"Dns": [], | |
"DnsOptions": [], | |
"DnsSearch": [], | |
"ExtraHosts": [], | |
"GroupAdd": [], | |
"IpcMode": "", | |
"Cgroup": "", | |
"Cgroups": "default", | |
"Links": null, | |
"OomScoreAdj": 0, | |
"PidMode": "", | |
"Privileged": true, | |
"PublishAllPorts": false, | |
"ReadonlyRootfs": false, | |
"SecurityOpt": [], | |
"Tmpfs": {}, | |
"UTSMode": "", | |
"UsernsMode": "", | |
"ShmSize": 65536000, | |
"Runtime": "oci", | |
"ConsoleSize": [ | |
0, | |
0 | |
], | |
"Isolation": "", | |
"CpuShares": 0, | |
"Memory": 0, | |
"NanoCpus": 0, | |
"CgroupParent": "", | |
"BlkioWeight": 0, | |
"BlkioWeightDevice": null, | |
"BlkioDeviceReadBps": null, | |
"BlkioDeviceWriteBps": null, | |
"BlkioDeviceReadIOps": null, | |
"BlkioDeviceWriteIOps": null, | |
"CpuPeriod": 0, | |
"CpuQuota": 0, | |
"CpuRealtimePeriod": 0, | |
"CpuRealtimeRuntime": 0, | |
"CpusetCpus": "", | |
"CpusetMems": "", | |
"Devices": [], | |
"DiskQuota": 0, | |
"KernelMemory": 0, | |
"MemoryReservation": 0, | |
"MemorySwap": 0, | |
"MemorySwappiness": -1, | |
"OomKillDisable": false, | |
"PidsLimit": 4096, | |
"Ulimits": [ | |
{ | |
"Name": "RLIMIT_NOFILE", | |
"Soft": 1048576, | |
"Hard": 1048576 | |
}, | |
{ | |
"Name": "RLIMIT_NPROC", | |
"Soft": 4194304, | |
"Hard": 4194304 | |
} | |
], | |
"CpuCount": 0, | |
"CpuPercent": 0, | |
"IOMaximumIOps": 0, | |
"IOMaximumBandwidth": 0 | |
} | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
result's of CRC for Linux.