Dockerfile 1.0 KB

1234567891011121314151617181920212223242526
  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/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.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. RUN ldconfig
  13. RUN cd ZeroTierOne && make central-controller
  14. FROM centos:7
  15. COPY --from=builder /ZeroTierOne/zerotier-one /usr/local/bin/zerotier-one
  16. RUN chmod a+x /usr/local/bin/zerotier-one
  17. ADD ext/central-controller-docker/main.sh /
  18. RUN chmod a+x /main.sh
  19. ENTRYPOINT /main.sh