├── Dockerfile ├── History.md ├── Makefile ├── README.md ├── bump.sh └── datomic-version /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM clojure:lein-2.6.1-alpine 2 | 3 | MAINTAINER Christian Romney "cromney@pointslope.com" 4 | 5 | ENV DATOMIC_VERSION 0.9.5561 6 | ENV DATOMIC_HOME /opt/datomic-pro-$DATOMIC_VERSION 7 | ENV DATOMIC_DATA $DATOMIC_HOME/data 8 | 9 | RUN apk add --no-cache unzip curl 10 | 11 | # Datomic Pro Starter as easy as 1-2-3 12 | # 1. Create a .credentials file containing user:pass 13 | # for downloading from my.datomic.com 14 | ONBUILD ADD .credentials /tmp/.credentials 15 | 16 | # 2. Make sure to have a config/ folder in the same folder as your 17 | # Dockerfile containing the transactor property file you wish to use 18 | ONBUILD RUN curl -u $(cat /tmp/.credentials) -SL https://my.datomic.com/repo/com/datomic/datomic-pro/$DATOMIC_VERSION/datomic-pro-$DATOMIC_VERSION.zip -o /tmp/datomic.zip \ 19 | && unzip /tmp/datomic.zip -d /opt \ 20 | && rm -f /tmp/datomic.zip 21 | 22 | ONBUILD ADD config $DATOMIC_HOME/config 23 | 24 | WORKDIR $DATOMIC_HOME 25 | RUN echo DATOMIC HOME: $DATOMIC_HOME 26 | ENTRYPOINT ["./bin/transactor"] 27 | 28 | # 3. Provide a CMD argument with the relative path to the 29 | # transactor.properties file it will supplement the ENTRYPOINT 30 | VOLUME $DATOMIC_DATA 31 | 32 | EXPOSE 4334 4335 4336 33 | -------------------------------------------------------------------------------- /History.md: -------------------------------------------------------------------------------- 1 | 0.9.5561 / 2017-03-30 2 | ================== 3 | Updated to Datomic version 0.9.5561 4 | 5 | 0.9.5544 / 2016-12-08 6 | ================== 7 | Updated to Datomic version 0.9.5544 8 | 9 | 0.9.5530 / 2016-12-02 10 | ================== 11 | Updated to Datomic version 0.9.5530 12 | 13 | This is a terrific update. This version is no longer subject 14 | to the 2-peer limit and unlocks all of Datomic Pro's features 15 | including HA and caching. 16 | 17 | 0.9.5394 / 2016-08-16 18 | ================== 19 | Updated to Datomic version 0.9.5394 20 | 21 | 0.9.5390 / 2016-08-10 22 | ================== 23 | Updated to Datomic version 0.9.5390 24 | 25 | 0.9.5385-alpine / 2016-07-22 26 | ============================= 27 | 50% image size reduction 28 | Now based on official clojure:lein-2.6.1-alpine image 29 | 30 | 0.9.5385 / 2016-06-29 31 | ===================== 32 | Updated to Datomic version 0.9.5385 33 | 34 | 0.9.5372 / 2016-06-23 35 | ===================== 36 | Updated to Datomic version 0.9.5372 37 | 38 | 0.9.5359 / 2016-05-09 39 | ===================== 40 | Updated to Datomic version 0.9.5359 41 | Updated Leiningen to 2.6.1 42 | 43 | 0.9.5344 / 2015-12-10 44 | ===================== 45 | Updated and tagged Datomic version 0.9.5344. 46 | Fixes broken console shipped in previous release. 47 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | DOCKER_IMAGE=pointslope/datomic-pro-starter 2 | DOCKER_TAG?=$(shell ./datomic-version) 3 | 4 | .PHONY: all clean info 5 | 6 | all: Dockerfile 7 | docker build -t $(DOCKER_IMAGE):$(DOCKER_TAG) . 8 | 9 | clean: 10 | docker rmi $(DOCKER_IMAGE):$(DOCKER_TAG) 11 | 12 | info: 13 | @echo "Docker image: $(DOCKER_IMAGE):$(DOCKER_TAG)" 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Datomic Pro Starter 2 | 3 | This Dockerfile defines a base image 4 | for [Datomic Pro Starter Edition](http://www.datomic.com/). It defines 5 | the necessary automation steps for running Datomic, while deferring 6 | all privileged, user-specific configuration to a derived image via 7 | **ONBUILD** instructions. 8 | 9 | This approach makes it trivial to customize your own Dockerfile to run 10 | any supported Datomic configuration. To do so, you need only to follow 11 | these steps: 12 | 13 | 1. Create a `Dockerfile` that is based **FROM** this image 14 | 2. Create a `.credentials` file containing your http user and password 15 | for downloading from **my.datomic.com** in the form `user:pass` 16 | 3. Create a `config` folder where your `Dockerfile` resides and place 17 | your Datomic transactor.properties config file(s) within it 18 | 4. Add a **CMD** instruction in your `Dockerfile` with the relative 19 | path to that file e.g. **config/riak.properties** 20 | 21 | No other configuration is necessary. Simply **docker build** and 22 | **docker run** your image. 23 | 24 | ## Example Folder Structure 25 | 26 | . 27 | ├── .credentials 28 | ├── Dockerfile 29 | └── config 30 | └── dev-transactor.properties 31 | 32 | ## Example Dockerfile 33 | 34 | FROM pointslope/datomic-pro-starter:0.9.5561 35 | MAINTAINER John Doe "jdoe@example.org" 36 | CMD ["config/dev-transactor.properties"] 37 | 38 | ## Miscellany 39 | 40 | The Dockerfile **EXPOSES** port 4334 and establises a **VOLUME** at 41 | `/opt/datomic-pro-$DATOMIC_VERSION/data`. 42 | 43 | ## License 44 | 45 | The MIT License (MIT) 46 | 47 | Copyright (c) 2014-2017 Point Slope, LLC. 48 | 49 | Permission is hereby granted, free of charge, to any person obtaining 50 | a copy of this software and associated documentation files (the 51 | "Software"), to deal in the Software without restriction, including 52 | without limitation the rights to use, copy, modify, merge, publish, 53 | distribute, sublicense, and/or sell copies of the Software, and to 54 | permit persons to whom the Software is furnished to do so, subject to 55 | the following conditions: 56 | 57 | The above copyright notice and this permission notice shall be 58 | included in all copies or substantial portions of the Software. 59 | 60 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 61 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 62 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 63 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 64 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 65 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 66 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 67 | -------------------------------------------------------------------------------- /bump.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [[ $# -eq 0 ]]; then 5 | printf "usage: $(basename $0) \n"; 6 | exit 1; 7 | fi 8 | 9 | sed -i '' -e "s/^ENV DATOMIC_VERSION [0-9]\.[0-9]\.[0-9]*/ENV DATOMIC_VERSION $1/" Dockerfile 10 | sed -i '' -e "s/datomic-pro-starter:[0-9]\.[0-9]\.[0-9]*/datomic-pro-starter:$1/" README.md 11 | -------------------------------------------------------------------------------- /datomic-version: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | grep DATOMIC_VERSION Dockerfile | head -n1 | awk '{print $3}' 3 | --------------------------------------------------------------------------------