Skip to content

Commit

Permalink
Merge pull request #3 from manics/docker-v1.0
Browse files Browse the repository at this point in the history
Add Dockerfile
  • Loading branch information
antalbalint committed Dec 9, 2015
2 parents b90f5c0 + 0d34239 commit 1a671d2
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
33 changes: 33 additions & 0 deletions DOCKER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Running Mineotaur in Docker
===========================

Clone this repository, and build the Mineotaur Docker image:

docker build -t mineotaur .

Create a Mineotaur data directory, e.g. `/mineotaur-data`, containing the properties file:
- `XXX.input`

If the feature data is not provided by OMERO then also create the sample and label files:
- `XXX_sample.tsv`
- `XXX_labels.tsv`

Run the Docker image to create the Mineotaur data. The Mineotaur data directory must be mounted under `/mineotaur`, generated data will be written to a subdirectory in this directory named after the input screen:

docker run -v /mineotaur-data:/mineotaur mineotaur -import XXX.input

If the feature data is not provided by OMERO:

docker run -v /mineotaur-data:/mineotaur mineotaur \
-import XXX.input XXX_sample.tsv XXX_labels.tsv

You should see several log messages, ending with

INFO: Database generation finished. Start Mineotaur instance with -start YYY

where `YYY` is the name of the analysed screen.
Run the Mineotaur web application, substituting `YYY`:

docker run -v /mineotaur-data:/mineotaur --start YYY

Mineotaur should be listening on port 8080 of the container.
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM centos:centos7
MAINTAINER ome-devel@lists.openmicroscopy.org.uk

ENV MAVEN_VERSION=3.0.5

RUN yum install -y java-1.8.0-openjdk-devel tar

# Don't use maven from repos because it pulls in Java 7
RUN curl -L -o apache-maven-$MAVEN_VERSION-bin.tar.gz \
http://mirror.olnevhost.net/pub/apache/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz && \
tar -zxvf apache-maven-$MAVEN_VERSION-bin.tar.gz && \
mv apache-maven-$MAVEN_VERSION /opt/maven && \
rm apache-maven-$MAVEN_VERSION-bin.tar.gz

RUN useradd build
COPY . /home/build/src/
RUN chown -R build:build /home/build/src

USER build
WORKDIR /home/build/src
RUN /opt/maven/bin/mvn install

WORKDIR /mineotaur
ENTRYPOINT ["java", "-jar", "/home/build/src/target/Mineotaur-1.0.1.jar"]
CMD ["-help"]

0 comments on commit 1a671d2

Please sign in to comment.