Dockerfile 1.3 KB

12345678910111213141516171819202122232425262728
  1. # Dockerfile for ZeroTier Central Controllers
  2. FROM centos:7 as builder
  3. MAINTAINER Adam Ierymekno <[email protected]>, Grant Limberg <[email protected]>
  4. ARG git_branch=master
  5. RUN yum update -y
  6. RUN yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
  7. RUN yum -y install epel-release && yum -y update && yum clean all
  8. RUN yum groupinstall -y "Development Tools"
  9. RUN yum install -y bash postgresql10 postgresql10-devel libpqxx-devel glibc-static libstdc++-static clang jemalloc jemalloc-devel
  10. # RUN git clone http://git.int.zerotier.com/zerotier/ZeroTierOne.git
  11. # RUN if [ "$git_branch" != "master" ]; then cd ZeroTierOne && git checkout -b $git_branch origin/$git_branch; fi
  12. ADD . /ZeroTierOne
  13. RUN cd ZeroTierOne && make clean && make central-controller
  14. FROM centos:7
  15. RUN yum install -y yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm && yum -y install epel-release && yum -y update && yum clean all
  16. RUN yum install -y jemalloc jemalloc-devel postgresql10
  17. COPY --from=builder /ZeroTierOne/zerotier-one /usr/local/bin/zerotier-one
  18. RUN chmod a+x /usr/local/bin/zerotier-one
  19. ADD ext/central-controller-docker/main.sh /
  20. RUN chmod a+x /main.sh
  21. ENTRYPOINT /main.sh