Permalink
Browse files

Changes to picard Dockerfile

Build it from source directly, instead of relying on jar to exist. Should allow dockerhub to build the image
  • Loading branch information...
1 parent 2633b7f commit 9dfe08e9e05549623c740cbb1d81664e0caaae8e @bradtaylor bradtaylor committed Jul 17, 2015
Showing with 19 additions and 2 deletions.
  1. +19 −2 Dockerfile
View
@@ -1,7 +1,24 @@
FROM broadinstitute/java-baseimage
MAINTAINER Broad Institute DSDE <dsde-engineering@broadinstitute.org>
-COPY dist/picard.jar /usr/picard/picard.jar
+# Install ant, git for building
+RUN apt-get update && \
+ apt-get --no-install-recommends install -y --force-yes \
+ git \
+ ant && \
+ apt-get clean autoclean && \
+ apt-get autoremove -y
+
+# Assumes Dockerfile lives in root of the git repo. Pull source files into container
+COPY build.xml /usr/picard/build.xml
+COPY src /usr/picard/src
+COPY lib /usr/picard/lib
WORKDIR /usr/picard
-ENTRYPOINT ["java", "-jar", "picard.jar"]
+# Clone out htsjdk. First turn off git ssl verification
+RUN git config --global http.sslVerify false && git clone https://github.com/samtools/htsjdk.git
+
+# Build the distribution jar, clean up everything else
+RUN ant clean all && mv dist/picard.jar picard.jar && ant clean && rm -rf htsjdk && rm -rf src && rm -rf lib && rm build.xml
+
+ENTRYPOINT ["java", "-jar", "picard.jar"]

0 comments on commit 9dfe08e

Please sign in to comment.