Skip to content

Instantly share code, notes, and snippets.

@vimtaku
Created February 3, 2015 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vimtaku/94cef31a166921b9b7f2 to your computer and use it in GitHub Desktop.
Save vimtaku/94cef31a166921b9b7f2 to your computer and use it in GitHub Desktop.
Datomic free 0.9.5130
## copy from https://registry.hub.docker.com/u/colinrymer/docker-datomic-free/ and change a little.
# Datomic Free v0.9.5130
#
# It's public image to run datomic database on docker container.
FROM dockerfile/java
MAINTAINER Timo Sulg, timo@tauho.com
#-- INSTALL PREREQURIEMENTS
#update package manager
RUN sudo apt-get -y update
# install curl
RUN sudo apt-get install -y curl
# install unzip
RUN sudo apt-get install -y unzip
#initialise global variables
ENV DATOMIC_VERSION 0.9.5130
ENV DATOMIC_HOME /home/docker/datomic
ENV JAVA_HOME /usr/lib/jvm/java-7-oracle
ENV PATH $JAVA_HOME:/bin:/usr/bin:$PATH
#-- SETUP DATOMIC
# create required folders
RUN mkdir ~/temp
RUN mkdir ~/datomic
RUN mkdir ~/datomic_configs
# download source
RUN echo Downloading version ${DATOMIC_VERSION}
RUN curl --progress-bar --location\
--user-agent 'tauhoDB (info@tauho.db)'\
--url "https://my.datomic.com/downloads/free/${DATOMIC_VERSION}"\
--output ~/temp/datomic.zip
# unzip datomic
RUN unzip -u ~/temp/datomic.zip -d ~/temp
#move unzipped files into own folder and remove temp folder
RUN cp -r ~/temp/datomic-free-${DATOMIC_VERSION}/* ~/datomic
RUN rm -r ~/temp
#-- MOUNT Volumes
# mount data folder on host
#VOLUME [/datomic_configs, /root/datomic_data]
#-- IMPORT transactor file from vagrant HOST into container
#ADD /datomic_configs/ /root/datomic_configs/
#-- RUN DATOMIC
# copy default transactor into datomic root
RUN cp ~/datomic/config/samples/free-transactor-template.properties ~/datomic/free-transactor.properties
# modify url in transactor file
RUN sed "s/host=localhost/host=0.0.0.0/" -i ~/datomic/free-transactor.properties
RUN sed "/host=0.0.0.0/a alt-host=127.0.0.1" -i ~/datomic/free-transactor.properties
#ADD run.sh /usr/local/bin/run.sh
# -- execute free transactor with updated settings
CMD ["/root/datomic/bin/transactor", "/root/datomic/free-transactor.properties"]
#CMD ["/usr/local/bin/run.sh"]
EXPOSE 4334 4335 4336
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment