Skip to content

Instantly share code, notes, and snippets.

@yachi
Created October 24, 2017 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yachi/e39b9241a70754a6ddb658f765cb00ff to your computer and use it in GitHub Desktop.
Save yachi/e39b9241a70754a6ddb658f765cb00ff to your computer and use it in GitHub Desktop.
alpine dig
docker run --rm -it alpine sh -c 'apk add --update bind-tools; dig google.com.hk; dig @8.8.8.8 google.com.hk'
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
(1/4) Installing libgcc (6.3.0-r4)
(2/4) Installing libxml2 (2.9.4-r4)
(3/4) Installing bind-libs (9.11.1_p1-r1)
(4/4) Installing bind-tools (9.11.1_p1-r1)
Executing busybox-1.26.2-r5.trigger
OK: 9 MiB in 15 packages
; <<>> DiG 9.11.1-P1 <<>> google.com.hk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58586
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;google.com.hk. IN A
;; ANSWER SECTION:
google.com.hk. 187 IN A 216.58.199.99
;; Query time: 7 msec
;; SERVER: 192.168.65.1#53(192.168.65.1)
;; WHEN: Tue Oct 24 08:53:38 UTC 2017
;; MSG SIZE rcvd: 47
; <<>> DiG 9.11.1-P1 <<>> @8.8.8.8 google.com.hk
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15175
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com.hk. IN A
;; ANSWER SECTION:
google.com.hk. 299 IN A 216.58.199.99
;; Query time: 20 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Oct 24 08:53:38 UTC 2017
;; MSG SIZE rcvd: 58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment