diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..3e9442cf2f26d70b952c55eccea502d59a2df7ea --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM frekele/ant:1.10.3-jdk8 as BUILD +RUN mkdir /usr/build +COPY src /usr/build/src +COPY etc /usr/build/etc +COPY war /usr/build/war +COPY VERSION /usr/build +RUN cd /usr/build/etc/build/ +RUN ant -file /usr/build/etc/build/build.xml war + +FROM tomcat:9.0 as TARGET +COPY --from=BUILD /usr/build/build/draw.war /usr/local/tomcat/webapps/ +EXPOSE 8080 +CMD ["catalina.sh", "run"] \ No newline at end of file diff --git a/README.md b/README.md index bebadf74298004d7636e809ad34823ef6662b5b1..c716e6fd0568677237a1ab3d57cbc7d2139b09cc 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,16 @@ A development guide is being started on the GitHub project wiki. There is a [dra The [mxGraph documentation](https://jgraph.github.io/mxgraph/) provides a lot of the docs for the bottom part of the stack. There is an [mxgraph tag on SO](http://stackoverflow.com/questions/tagged/mxgraph). + +Docker +------ +After successful build, from the project directory run +```bash +docker build -t draw . +docker run -d -p 8888:8080 draw +``` +Now the app will be accessible at http://localhost:8888/draw/?https=0 + Running ------- The simplest way to run draw.io initially is to fork this project, [publish the master branch to GitHub pages](https://help.github.com/categories/github-pages-basics/) and the [pages sites](https://jgraph.github.io/drawio/src/main/webapp/index.html) will have the full editor functionality (sans the integrations).