summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netcon/Dockerfile44
-rw-r--r--netcon/NetconEthernetTap.cpp2
2 files changed, 45 insertions, 1 deletions
diff --git a/netcon/Dockerfile b/netcon/Dockerfile
new file mode 100644
index 00000000..2c183b0f
--- /dev/null
+++ b/netcon/Dockerfile
@@ -0,0 +1,44 @@
+# A basic harnessed application example using ZeroTier-One and user-space IP stack
+FROM fedora:20
+
+MAINTAINER https://www.zerotier.com/
+
+# Add files
+ADD ZeroTierOneInstaller-linux-x64-1_0_5 /
+ADD zerotier-one /
+ADD intercept /
+ADD lib/libintercept.so.1.0 /
+ADD lib/liblwip.so /
+
+# 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
+
+# Install Apache
+RUN yum -y update && yum clean all
+RUN yum -y install httpd && yum clean all
+RUN echo "Apache" >> /var/www/html/index.html
+
+EXPOSE 80
+
+# Simple startup script to avoid some issues observed with container restart
+ADD run-apache.sh /run-apache.sh
+RUN chmod -v +x /run-apache.sh
+
+CMD ["/run-apache.sh"]
+
+
+
+
+
+# Install ZeroTier-One
+#chmod 755 ZeroTierOneInstaller-linux-x64-1_0_5
+#sudo ./ZeroTierOneInstaller-linux-x64-1_0_5
+
+# Start ZeroTier-One
+CMD ["./zerotier-one", "-U -p9990 /root/dev/ztest", "FOREGROUND"]
+
+# Start Applications
+#CMD ["intercept", "/sbin/sshd", "FOREGROUND"]
+RUN intercept httpd
diff --git a/netcon/NetconEthernetTap.cpp b/netcon/NetconEthernetTap.cpp
index e46ac885..f1051900 100644
--- a/netcon/NetconEthernetTap.cpp
+++ b/netcon/NetconEthernetTap.cpp
@@ -79,7 +79,7 @@ NetconEthernetTap::NetconEthernetTap(
Utils::snprintf(sockPath,sizeof(sockPath),"/tmp/.ztnc_%.16llx",(unsigned long long)nwid);
_dev = sockPath;
- lwipstack = new LWIPStack("ext/bin/lwip/liblwip.so"); // ext/bin/liblwip.so.debug for debug symbols
+ lwipstack = new LWIPStack("lib/liblwip.so"); // ext/bin/liblwip.so.debug for debug symbols
if(!lwipstack) // TODO double check this check
throw std::runtime_error("unable to load lwip lib.");
lwipstack->lwip_init();