Skip to content

Instantly share code, notes, and snippets.

@nemosupremo
Created March 4, 2015 22:21
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 nemosupremo/261205f2d4418ea93cdb to your computer and use it in GitHub Desktop.
Save nemosupremo/261205f2d4418ea93cdb to your computer and use it in GitHub Desktop.
FROM golang:1.4.1-wheezy
MAINTAINER ChannelMeter <product@channelmeter.com>
RUN go get github.com/miekg/dns
RUN go get github.com/mesosphere/mesos-dns
RUN cd $GOPATH/src/github.com/mesosphere/mesos-dns && go build -o /opt/mesos-dns
ENV MESOS_MASTERS mesos1:5050,mesos2:5050,mesos3:5050
ENV DNS_REFRESH_SECONDS 50
ENV DNS_TTL 60
ENV DNS_DOMAIN mesos
ENV DNS_RESOLVERS 8.8.8.8
ENV DNS_TIMEOUT 10
ENV DNS_LISTENER 0.0.0.0
ENV DNS_EMAIL root.mesos-dns.mesos
EXPOSE 53
EXPOSE 53/udp
CMD ["/bin/bash", "-c", "echo { \\\"masters\\\": [\\\"`echo ${MESOS_MASTERS} | sed -e s/,/\\\",\\\"/g`\\\"], \\\"refreshSeconds\\\": ${DNS_REFRESH_SECONDS}, \\\"ttl\\\": ${DNS_TTL}, \\\"domain\\\": \\\"${DNS_DOMAIN}\\\", \\\"port\\\": 53, \\\"resolvers\\\": [\\\"`echo ${DNS_RESOLVERS} | sed -e s/,/\\\",\\\"/g`\\\"], \\\"timeout\\\": ${DNS_TIMEOUT}, \\\"listener\\\": \\\"${DNS_LISTENER}\\\", \\\"email\\\": \\\"${DNS_EMAIL}\\\"} > /opt/config.json && /opt/mesos-dns -config=/opt/config.json"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment