aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorTommy Carpenter <tommy@research.att.com>2017-08-22 18:07:40 -0400
committerTommy Carpenter <tommy@research.att.com>2017-08-22 18:08:22 -0400
commit647addf5d6c78b2b8c941cc9cd8c57a3eb9f30b4 (patch)
tree4de88ed0c8b175b271b5d7da6076ebf3da40e466 /Dockerfile
parentc7b6dc90e4cde0ac8524539fc02ab2943c88048a (diff)
[DCAEGEN2-42] Initial commit of broker
Change-Id: I1c553c82d5b39a4c134c44e2320ac0e44785e0ef Signed-off-by: Tommy Carpenter <tommy@research.att.com>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..ef4f76e
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,30 @@
+FROM erlang:19.2
+MAINTAINER tommy at research dot eh tee tee dot com
+
+ENV TERM=xterm
+
+#copy files into repo
+ADD src /tmp/src
+ADD test /tmp/test
+ADD rebar.config /tmp
+ADD entry.sh /tmp
+ADD config /tmp/config
+
+WORKDIR /tmp
+
+#make sure there is no leftover release
+RUN rm -rf _build/
+
+#build
+RUN rebar3 upgrade
+RUN rebar3 release
+
+#fail the docker build if unit tests fail
+RUN rebar3 eunit
+
+#set the broker test type so the integration test can be run inside Docker
+ENV BROKER_TEST_TYPE=DOCKER
+
+#run
+EXPOSE 7777
+ENTRYPOINT ["/tmp/entry.sh"]