ZeroTierOne/ext/central-controller-docker/Dockerfile

27 lines
1.0 KiB
Docker
Raw Normal View History

2019-08-26 19:19:50 +00:00
# Dockerfile for ZeroTier Central Controllers
FROM centos:7 as builder
2019-08-26 19:19:50 +00:00
MAINTAINER Adam Ierymekno <adam.ierymenko@zerotier.com>, Grant Limberg <grant.limberg@zerotier.com>
ARG git_branch=master
2019-08-26 19:19:50 +00:00
RUN yum update -y
RUN yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
RUN yum -y install epel-release && yum -y update && yum clean all
RUN yum groupinstall -y "Development Tools"
RUN yum install -y bash postgresql10 postgresql10-devel libpqxx-devel glibc-static libstdc++-static clang jemalloc jemalloc-devel
2019-08-26 19:19:50 +00:00
RUN git clone http://git.int.zerotier.com/zerotier/ZeroTierOne.git
RUN if [ "$git_branch" != "master" ]; then cd ZeroTierOne && git checkout -b $git_branch origin/$git_branch; fi
RUN ldconfig
RUN cd ZeroTierOne && make central-controller
FROM centos:7
2019-08-26 19:19:50 +00:00
COPY --from=builder /ZeroTierOne/zerotier-one /usr/local/bin/zerotier-one
2019-08-26 19:19:50 +00:00
RUN chmod a+x /usr/local/bin/zerotier-one
ADD ext/central-controller-docker/main.sh /
2019-08-26 19:19:50 +00:00
RUN chmod a+x /main.sh
ENTRYPOINT /main.sh