class Pygmy::Dnsmasq

Public Class Methods

addr() click to toggle source
# File lib/pygmy/dnsmasq.rb, line 19
def self.addr
  '127.0.0.1'
end
container_name() click to toggle source
# File lib/pygmy/dnsmasq.rb, line 11
def self.container_name
  'amazeeio-dnsmasq'
end
domain() click to toggle source
# File lib/pygmy/dnsmasq.rb, line 15
def self.domain
  'docker.amazee.io'
end
image_name() click to toggle source
# File lib/pygmy/dnsmasq.rb, line 7
def self.image_name
  'oceaniclagoon/dnsmasq:2.83'
end
run_cmd(domain = self.domain, addr = self.addr) click to toggle source
# File lib/pygmy/dnsmasq.rb, line 23
def self.run_cmd(domain = self.domain, addr = self.addr)
  "docker run -d -p 6053:53/tcp -p 6053:53/udp --name=#{Shellwords.escape(self.container_name)} " \
  "--cap-add=NET_ADMIN #{Shellwords.escape(self.image_name)} -A /#{Shellwords.escape(domain)}/#{Shellwords.escape(addr)}"
end