2015-09-28 00:51:32 +00:00
|
|
|
# A basic harnessed application example using ZeroTier-One and user-space IP stack
|
|
|
|
FROM fedora:20
|
|
|
|
|
|
|
|
MAINTAINER https://www.zerotier.com/
|
|
|
|
|
2015-09-28 21:59:54 +00:00
|
|
|
# Install Apache
|
|
|
|
RUN yum -y update && yum clean all
|
|
|
|
RUN yum -y install httpd && yum clean all
|
|
|
|
|
2015-09-28 00:51:32 +00:00
|
|
|
# Add files
|
|
|
|
ADD zerotier-one /
|
2015-09-28 21:30:18 +00:00
|
|
|
ADD zerotier-cli /
|
2015-09-28 00:51:32 +00:00
|
|
|
ADD intercept /
|
|
|
|
ADD lib/libintercept.so.1.0 /
|
|
|
|
ADD lib/liblwip.so /
|
2015-09-29 18:32:07 +00:00
|
|
|
ADD htdocs/index.html /
|
|
|
|
ADD htdocs/ZeroTierIcon.png /
|
2015-09-28 00:51:32 +00:00
|
|
|
|
2015-09-28 20:56:14 +00:00
|
|
|
RUN cp libintercept.so.1.0 lib/libintercept.so.1.0
|
|
|
|
RUN cp liblwip.so lib/liblwip.so
|
|
|
|
|
2015-09-28 00:51:32 +00:00
|
|
|
# Install sys-call intercept library
|
|
|
|
RUN cp libintercept.so.1.0 /lib/libintercept.so.1.0
|
|
|
|
RUN ln -sf /lib/libintercept.so.1.0 /lib/libintercept
|
|
|
|
RUN /usr/bin/install -c intercept /usr/bin
|
|
|
|
|
2015-09-28 21:30:18 +00:00
|
|
|
RUN echo "Apache" >> /var/www/html/index.html
|
2015-09-28 01:16:02 +00:00
|
|
|
EXPOSE 9993/udp
|
2015-09-28 00:51:32 +00:00
|
|
|
|
2015-09-29 18:32:07 +00:00
|
|
|
RUN mv index.html /var/www/html/index.html
|
|
|
|
RUN mv ZeroTierIcon.png /var/www/html/ZeroTierIcon.png
|
|
|
|
|
2015-09-28 00:51:32 +00:00
|
|
|
# Start ZeroTier-One
|
2015-09-28 01:26:57 +00:00
|
|
|
RUN mkdir -p /var/lib/zerotier-one/networks.d
|
2015-09-28 23:14:32 +00:00
|
|
|
RUN touch /var/lib/zerotier-one/networks.d/8056c2e21c000001.conf
|
2015-09-28 20:56:14 +00:00
|
|
|
|
2015-09-28 21:30:18 +00:00
|
|
|
ADD entrypoint.sh /entrypoint.sh
|
|
|
|
RUN chmod -v +x /entrypoint.sh
|
2015-09-28 21:47:38 +00:00
|
|
|
CMD ["./entrypoint.sh"]
|