2019-08-26 19:19:50 +00:00
|
|
|
# Dockerfile for ZeroTier Central Controllers
|
2020-05-12 22:17:57 +00:00
|
|
|
FROM centos:8 as builder
|
2019-08-26 19:19:50 +00:00
|
|
|
MAINTAINER Adam Ierymekno <adam.ierymenko@zerotier.com>, Grant Limberg <grant.limberg@zerotier.com>
|
|
|
|
|
2019-11-20 21:56:26 +00:00
|
|
|
ARG git_branch=master
|
|
|
|
|
2019-08-26 19:19:50 +00:00
|
|
|
RUN yum update -y
|
2021-05-28 22:00:54 +00:00
|
|
|
RUN yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
|
|
|
|
RUN dnf -qy module disable postgresql
|
2019-08-26 19:19:50 +00:00
|
|
|
RUN yum -y install epel-release && yum -y update && yum clean all
|
2019-11-20 21:56:26 +00:00
|
|
|
RUN yum groupinstall -y "Development Tools"
|
2021-06-04 01:30:32 +00:00
|
|
|
RUN yum install -y bash cmake postgresql10 postgresql10-devel clang jemalloc jemalloc-devel
|
|
|
|
RUN curl -sL https://github.com/jtv/libpqxx/archive/refs/tags/6.4.5.tar.gz -o libpqxx.tar.gz
|
|
|
|
RUN tar -xzf libpqxx.tar.gz && \
|
|
|
|
pushd libpqxx-6.4.5/ && \
|
|
|
|
mkdir build && pushd build/ && \
|
|
|
|
cmake .. && \
|
|
|
|
make install && \
|
|
|
|
popd && popd
|
|
|
|
|
2019-08-26 19:19:50 +00:00
|
|
|
|
2020-03-04 07:52:53 +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
|
|
|
|
ADD . /ZeroTierOne
|
|
|
|
RUN cd ZeroTierOne && make clean && make central-controller
|
2019-11-20 21:56:26 +00:00
|
|
|
|
2020-05-12 22:17:57 +00:00
|
|
|
FROM centos:8
|
2021-05-28 22:00:54 +00:00
|
|
|
RUN yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
|
|
|
|
RUN dnf -qy module disable postgresql
|
|
|
|
RUN yum -y install epel-release && yum -y update && yum clean all
|
2020-02-24 19:02:05 +00:00
|
|
|
RUN yum install -y jemalloc jemalloc-devel postgresql10
|
2019-08-26 19:19:50 +00:00
|
|
|
|
2021-06-04 01:30:32 +00:00
|
|
|
COPY --from=builder /usr/local/lib64/libpqxx.so /usr/local/lib64/libpqxx.so
|
|
|
|
COPY --from=builder /usr/local/lib64/libpqxx.a /usr/local/lib64/libpqxx.a
|
2019-11-20 21:56:26 +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
|
|
|
|
|
2019-11-20 21:56:26 +00:00
|
|
|
ADD ext/central-controller-docker/main.sh /
|
2019-08-26 19:19:50 +00:00
|
|
|
RUN chmod a+x /main.sh
|
|
|
|
|
|
|
|
ENTRYPOINT /main.sh
|