├── Dockerfile ├── LICENSE └── README.md /Dockerfile: -------------------------------------------------------------------------------- 1 | # Container running Event Store 2 | # 3 | # VERSION 0.1 4 | FROM ubuntu 5 | MAINTAINER Alexander "iam.asm89@gmail.com" 6 | 7 | # make sure the package repository is up to date 8 | RUN apt-get update 9 | 10 | # install packages required to build mono and the eventstore 11 | RUN apt-get install -y git subversion 12 | RUN apt-get install -y autoconf automake libtool gettext libglib2.0-dev libfontconfig1-dev mono-gmcs 13 | RUN apt-get install -y build-essential 14 | 15 | # download mono 3.1.2 16 | RUN (cd /var/local; curl -O http://download.mono-project.com/sources/mono/mono-3.1.2.tar.bz2) 17 | RUN (cd /var/local; tar -xjvf mono-3.1.2.tar.bz2) 18 | 19 | # build and install mono 20 | RUN (cd /var/local/mono-3.1.2; ./configure --prefix=/usr/local; make; make install) 21 | 22 | # get eventstore and build it 23 | RUN git clone https://github.com/EventStore/EventStore.git /var/local/EventStore --depth=1 24 | RUN (cd /var/local/EventStore; ./build.sh full configuration=release) 25 | 26 | # setup directory structure 27 | ENV EVENTSTORE_OUT /var/local/EventStore/bin/eventstore/release/anycpu 28 | ENV EVENTSTORE_BIN /var/local/EventStore/bin/eventstore/release/anycpu 29 | ENV EVENTSTORE_DB /opt/eventstore/db 30 | ENV EVENTSTORE_LOG /opt/eventstore/logs 31 | 32 | # make directories 33 | RUN mkdir -p $EVENTSTORE_BIN 34 | RUN mkdir -p $EVENTSTORE_LOG 35 | RUN mkdir -p $EVENTSTORE_DB 36 | 37 | # expose LD library path 38 | ENV LD_LIBRARY_PATH $EVENTSTORE_BIN 39 | 40 | # export the http and tcp port 41 | EXPOSE 2113 42 | EXPOSE 1113 43 | 44 | # set entry point to eventstore executable 45 | ENTRYPOINT ["mono-sgen", "/var/local/EventStore/bin/eventstore/release/anycpu/EventStore.SingleNode.exe", "--log=/opt/eventstore/logs", "--db=/opt/eventstore/db"] 46 | 47 | # bind it to all interfaces by default 48 | CMD ["--ip=0.0.0.0", "--http-prefix=http://*:2113/"] 49 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | docker-event-store 2 | ================== 3 | 4 | A Dockerfile that produces a container that runs [EventStore]. 5 | 6 | [EventStore]: http://geteventstore.com/ 7 | 8 | ## Building a container 9 | 10 | Clone the repository, enter the directory, then build the image. By default the 11 | master branch of the [EventStore repository] is used for the build: 12 | 13 | ```bash 14 | $ git clone https://github.com/asm89/docker-event-store.git 15 | $ cd docker-event-store 16 | $ docker build -t event-store . 17 | ``` 18 | 19 | [EventStore repository]: https://github.com/EventStore/EventStore 20 | 21 | ## Running Event Store 22 | 23 | After you've successfully built the container you can it like this: 24 | 25 | ```bash 26 | $ docker run -t -i event-store:latest 27 | ``` 28 | 29 | Now find the ip address of the running event store: 30 | 31 | ```bash 32 | $ docker ps 33 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 34 | 7c25c343e248 event-store:latest mono-sgen /var/local 6 seconds ago Up 5 seconds 1113/tcp, 2113/tcp loving_pasteur 35 | $ docker inspect 7c25c343e248 | grep IPAddress 36 | "IPAddress": "172.17.0.2", 37 | ``` 38 | 39 | Visit `http://172.17.0.2:2113` for the web ui! 40 | 41 | ## Thanks to 42 | 43 | The Dockerfile in this repository is based on the original one by [pjvds] that 44 | can be found [here]. 45 | 46 | [pjvds]: https://github.com/pjvds 47 | [here]: https://github.com/pjvds/Dockerfiles 48 | --------------------------------------------------------------------------------