diff --git a/.dockerignore b/.dockerignore new file mode 120000 index 000000000..3e4e48b0b --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.gitignore \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..b11a094e2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# http://github.com/broadinstitute/scala-baseimage +FROM broadinstitute/scala-baseimage + +# Cromwell's HTTP Port +EXPOSE 8000 + +# Install Cromwell +ADD . /cromwell +RUN ["/bin/bash", "-c", "/cromwell/docker/install.sh /cromwell"] + +# Add Cromwell as a service (it will start when the container starts) +RUN mkdir /etc/service/cromwell +ADD docker/run.sh /etc/service/cromwell/run + +# These next 4 commands are for enabling SSH to the container. +# id_rsa.pub is referenced below, but this should be any public key +# that you want to be added to authorized_keys for the root user. +# Copy the public key into this directory because ADD cannot reference +# Files outside of this directory + +#EXPOSE 22 +#RUN rm -f /etc/service/sshd/down +#ADD id_rsa.pub /tmp/id_rsa.pub +#RUN cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys diff --git a/docker/install.sh b/docker/install.sh new file mode 100755 index 000000000..3ea288820 --- /dev/null +++ b/docker/install.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +CROMWELL_DIR=$1 +cd $CROMWELL_DIR +sbt assembly +CROMWELL_JAR=$(find target | grep 'cromwell.*\.jar') +mv $CROMWELL_JAR . +sbt clean diff --git a/docker/run.sh b/docker/run.sh new file mode 100755 index 000000000..c379ba35f --- /dev/null +++ b/docker/run.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +java -jar $(find /cromwell | grep 'cromwell.*\.jar') server