From 1cae7327aeabeb4546a302c00985fb9413b63443 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 28 Oct 2015 13:35:52 -0700 Subject: [PATCH] Basic Dockerfile for building test agents. --- .gitignore | 5 ++--- tests/http/Dockerfile | 23 +++++++++++++++++++++++ tests/http/docker-main.sh | 6 ++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 tests/http/Dockerfile create mode 100644 tests/http/docker-main.sh diff --git a/.gitignore b/.gitignore index 06b06b7d3..89ab049fe 100755 --- a/.gitignore +++ b/.gitignore @@ -34,7 +34,7 @@ Thumbs.db /world/mkworld /world/*.c25519 -# Miscellaneous file types that we don't want to check in +# Miscellaneous temporaries, build files, etc. *.log *.opensdf *.user @@ -50,10 +50,9 @@ Thumbs.db *.autosave *.tmp node_modules - -# cluster-geo stuff cluster-geo/cluster-geo/config.js cluster-geo/cluster-geo/cache.* +tests/http/zerotier-one # MacGap wrapper build files /ext/mac-ui-macgap1-wrapper/src/MacGap.xcodeproj/project.xcworkspace/xcuserdata/* diff --git a/tests/http/Dockerfile b/tests/http/Dockerfile new file mode 100644 index 000000000..02578cd53 --- /dev/null +++ b/tests/http/Dockerfile @@ -0,0 +1,23 @@ +FROM centos:latest + +MAINTAINER https://www.zerotier.com/ + +EXPOSE 9993/udp + +RUN yum -y update && yum -y install epel-release && yum -y install nodejs npm && yum clean all + +RUN mkdir -p /var/lib/zerotier-one +RUN mkdir -p /var/lib/zerotier-one/networks.d +RUN touch /var/lib/zerotier-one/networks.d/ffffffffffffffff.conf + +ADD package.json / +RUN npm install + +ADD zerotier-one / +RUN chmod a+x /zerotier-one + +ADD agent.js / +ADD main.sh / +RUN chmod a+x /docker-main.sh + +CMD ["./docker-main.sh"] diff --git a/tests/http/docker-main.sh b/tests/http/docker-main.sh new file mode 100644 index 000000000..947ccf47a --- /dev/null +++ b/tests/http/docker-main.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin + +/zerotier-one -d +exec node --harmony /agent.js