Dockerfile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. FROM ubuntu:16.10
  2. RUN rm /bin/sh && ln -s /bin/bash /bin/sh
  3. RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
  4. RUN apt-get -y update \
  5. && apt-get -y install \
  6. build-essential \
  7. gcc \
  8. apt-utils \
  9. pkg-config \
  10. software-properties-common \
  11. apt-transport-https \
  12. libssl-dev \
  13. sudo \
  14. bash \
  15. curl \
  16. tar \
  17. git \
  18. netcat \
  19. bind9 \
  20. dnsutils \
  21. && apt-get -y update \
  22. && apt-get -y upgrade \
  23. && apt-get -y autoremove \
  24. && apt-get -y autoclean
  25. ENV GOROOT /usr/local/go
  26. ENV GOPATH /go
  27. ENV PATH ${GOPATH}/bin:${GOROOT}/bin:${PATH}
  28. ENV GO_VERSION REPLACE_ME_GO_VERSION
  29. ENV GO_DOWNLOAD_URL https://storage.googleapis.com/golang
  30. RUN rm -rf ${GOROOT} \
  31. && curl -s ${GO_DOWNLOAD_URL}/go${GO_VERSION}.linux-amd64.tar.gz | tar -v -C /usr/local/ -xz \
  32. && mkdir -p ${GOPATH}/src ${GOPATH}/bin \
  33. && go version
  34. RUN mkdir -p /var/bind /etc/bind
  35. RUN chown root:bind /var/bind /etc/bind
  36. ADD Procfile /Procfile
  37. ADD run.sh /run.sh
  38. ADD named.conf etcd.zone rdns.zone /etc/bind/
  39. RUN chown root:bind /etc/bind/named.conf /etc/bind/etcd.zone /etc/bind/rdns.zone
  40. ADD resolv.conf /etc/resolv.conf
  41. RUN go get github.com/mattn/goreman
  42. CMD ["/run.sh"]