Advertisement
CristianCantoro

docker_dns_config

Dec 14th, 2014
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var config = {};
  2.  
  3. config.development = false;
  4. config.debug = true;
  5.  
  6. // a fake top level domain
  7. // appended to all generated hostnames
  8. config.faketld = "docker.local";
  9.  
  10. // frequency of dns entry refresh from docker containers
  11. config.pollinterval = 17 * 1000;
  12.  
  13. // multiple dockers can be configured
  14. // each one should gets it's own namespace
  15. // hostname.publicname.faketld
  16. config.dockers  = [
  17.           {
  18.             // for 'publicly' exposed ports
  19.             // when a service is offered on '0.0.0.0'
  20.             // this is the IP lookups will return
  21.             publicip: "10.20.0.100",
  22.            
  23.             // the public name is to give this docker instance it's own namespace
  24.             publicname: "public.dockerA",
  25.            
  26.             // the local name is to provide a namespace for routing 172.17.0.0 addresses
  27.             localname: "local.dockerA",
  28.            
  29.             // dockerode config
  30.             // see: https://github.com/apocas/dockerode
  31.             // and http://docs.docker.io/en/latest/use/basics/#bind-docker
  32.             dockerode: {
  33.                 socketPath: '/var/run/docker.sock'
  34.             }
  35.           }
  36.           ];
  37.  
  38. // node-named config
  39. // see: https://github.com/trevoro/node-named
  40. // bindip is for this container only, not docker-wide
  41. config.node_named = {
  42.         port: 53,
  43.         bindip: '0.0.0.0'
  44. };
  45.  
  46. module.exports = config;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement