Guest User

Untitled

a guest
Dec 11th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | None | 0 0
  1. dragam@USDockerVM:~$ IRE> docker --version
  2. Docker version 18.09.0, build 4d60db4
  3.  
  4. docker pull mongo.
  5.  
  6. docker run --name tom-mongo -d mongo:latest
  7.  
  8. docker run -it --link tom-mongo:mongo --rm mongo mongo --host mongo test
  9.  
  10. > use local
  11. switched to db local
  12. > show collections
  13. startup_log
  14. > db.startup_log.find().pretty()
  15. produces 1 record with server startup details - time &c... no problems
  16.  
  17. dragam@USDockerVM:/$ IRE> docker ps
  18. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  19. 33c58af3862e mongo "docker-entrypoint.sā€¦" 2 minutes ago Up 2 minutes 27017/tcp agitated_hypatia
  20. c39d4ceff690 mongo:latest "docker-entrypoint.sā€¦" 41 minutes ago Up 41 minutes 27017/tcp tom-mongo
  21.  
  22. dragam@USDockerVM:/$ IRE> ps -ef | grep mongo
  23. 999 13490 13469 0 12:42 ? 00:00:05 mongod --bind_ip_all
  24. dragam 17466 13242 0 13:20 pts/1 00:00:00 docker run -it --link tom-mongo:mongo --rm mongo mongo --host mongo test
  25. 999 17535 17513 0 13:20 pts/0 00:00:00 mongo --host mongo test
  26. dragam 18021 2487 0 13:24 pts/0 00:00:00 grep --color=auto mongo
  27.  
  28. mongo mongodb://mongo:mongo@host:xxx.yyy.zzz.aaa/tom-mongo?ssl=true
  29.  
  30. mongo xxx.yyy.zzz.aaa/tom-mongo
  31.  
  32. dragam@USDockerVM:~$ IRE> lsb_release -a
  33. No LSB modules are available.
  34. Distributor ID: Ubuntu
  35. Description: Ubuntu 18.04.1 LTS
  36. Release: 18.04
  37. Codename: bionic
  38. dragam@USDockerVM:~$ IRE>
  39.  
  40. dragam@USDockerVM:/$ IRE> sudo iptables -L
  41. Chain INPUT (policy ACCEPT)
  42. target prot opt source destination
  43.  
  44. Chain FORWARD (policy DROP)
  45. target prot opt source destination
  46. DOCKER-USER all -- anywhere anywhere
  47. DOCKER-ISOLATION-STAGE-1 all -- anywhere anywhere
  48. ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
  49. DOCKER all -- anywhere anywhere
  50. ACCEPT all -- anywhere anywhere
  51. ACCEPT all -- anywhere anywhere
  52.  
  53. Chain OUTPUT (policy ACCEPT)
  54. target prot opt source destination
  55.  
  56. Chain DOCKER (1 references)
  57. target prot opt source destination
  58.  
  59. Chain DOCKER-ISOLATION-STAGE-1 (1 references)
  60. target prot opt source destination
  61. DOCKER-ISOLATION-STAGE-2 all -- anywhere anywhere
  62. RETURN all -- anywhere anywhere
  63.  
  64. Chain DOCKER-ISOLATION-STAGE-2 (1 references)
  65. target prot opt source destination
  66. DROP all -- anywhere anywhere
  67. RETURN all -- anywhere anywhere
  68.  
  69. Chain DOCKER-USER (1 references)
  70. target prot opt source destination
  71. RETURN all -- anywhere anywhere
  72. dragam@USDockerVM:/$ IRE>
Add Comment
Please, Sign In to add comment