Skip to content

Commit

Permalink
Add Docker files to build v1.0.2 image.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathancrabtree committed Jun 18, 2019
1 parent a7a9fb8 commit 640a777
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
42 changes: 42 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:18.04
MAINTAINER Jonathan Crabtree <jcrabtree@som.umaryland.edu>

RUN apt-get update && apt-get install -y curl

# Perl dependencies
RUN apt-get install -y libgd-svg-perl libjson-perl libtext-csv-perl liblog-log4perl-perl vcftools libbatik-java libmodule-build-perl make cpanminus bioperl fop
RUN cpanm Bio::FeatureIO::gff

# Install specific release of Circleator from source
RUN cd /opt && curl -LO https://github.com/jonathancrabtree/Circleator/archive/1.0.2.tar.gz && tar xzf 1.0.2.tar.gz
RUN cd /opt/Circleator-1.0.2 && perl Build.PL && ./Build && ./Build install
RUN cd /opt && ln -s Circleator-1.0.2 Circleator

# Install Circleator from GitHub master branch
#RUN head -c 5 /dev/random >random2.txt && cd /opt && curl -LO https://github.com/jonathancrabtree/Circleator/archive/master.zip && unzip master.zip
#RUN cd /opt/Circleator-master && perl Build.PL && ./Build && ./Build install
#RUN cd /opt && ln -s Circleator-master Circleator

# bam_get_coverage (optional Circleator extra)
# samtools 1.7 from source
RUN apt-get install -y libncurses5-dev zlib1g-dev libbz2-dev liblzma-dev gcc libglib2.0-dev
RUN cd /opt && curl -LO https://github.com/samtools/samtools/releases/download/1.7/samtools-1.7.tar.bz2 && tar xjf samtools-1.7.tar.bz2
RUN cd /opt/samtools-1.7 && ./configure && make
RUN cd /opt/Circleator/util/samtools && ./make.sh && cp bam_get_coverage *.pl ../*.pl /usr/local/bin/

# add non-root user
RUN useradd -ms /bin/bash circleator

# install tutorials in /home/circleator
RUN cd /opt && curl -LO https://github.com/jonathancrabtree/Circleator/archive/gh-pages.zip && unzip gh-pages.zip
RUN cp -r /opt/Circleator-gh-pages/tutorials /home/circleator/ && chown -R circleator:circleator /home/circleator/tutorials

# cleanup
RUN /bin/rm -rf /opt/Circleator-gh-pages /opt/*.gz /opt/*.zip /opt/*.bz2

# switch user
USER circleator
WORKDIR /home/circleator



3 changes: 3 additions & 0 deletions docker/build-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker build -t umigs/circleator-v1.0.2 .
3 changes: 3 additions & 0 deletions docker/run-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
docker run -dt --name 'c1' umigs/circleator-v1.0.2:latest
docker exec -i -t c1 /bin/bash

0 comments on commit 640a777

Please sign in to comment.