summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
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"]