Skip to content

Commit

Permalink
Merge pull request #2 from getwilds/df-reorg
Browse files Browse the repository at this point in the history
Reorganizing Dockerfiles into Subdirectories
  • Loading branch information
tefirman authored Feb 23, 2024
2 parents c33c455 + 799c9cd commit 69eb86b
Show file tree
Hide file tree
Showing 14 changed files with 253 additions and 25 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,18 @@ jobs:
-
name: Build and Push
run: |
docker build --platform linux/amd64 -t ghcr.io/getwilds/samtools:latest -f Dockerfile_samtools --push .
docker build --platform linux/amd64 -t ghcr.io/getwilds/gatk:latest -f Dockerfile_gatk --push .
docker build --platform linux/amd64 -t ghcr.io/getwilds/bwa:latest -f Dockerfile_bwa --push .
docker build --platform linux/amd64 -t ghcr.io/getwilds/picard:latest -f Dockerfile_picard --push .
docker build --platform linux/amd64 -t ghcr.io/getwilds/biobambam2:latest -f Dockerfile_biobambam2 --push .
docker build --platform linux/amd64 -t ghcr.io/getwilds/annovar:latest -f Dockerfile_annovar --push .
for TOOL in *
do
if [ -d $TOOL ]; then
for TAG in $TOOL/*
do
if [[ $TAG =~ Dockerfile_* ]]; then
IFS="_" read -ra newarr <<< "$TAG"
docker build --platform linux/amd64 -t ghcr.io/getwilds/$TOOL:${newarr[1]} -f $TOOL/$TAG --push .
fi
done
fi
done
7 changes: 3 additions & 4 deletions Dockerfile_annovar → annovar/Dockerfile_hg19
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ FROM ubuntu:noble-20240114

# Adding labels for the GitHub Container Registry
LABEL org.opencontainers.image.title="annovar"
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.description="Container image for the use of Annovar using hg19 in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="hg19"
LABEL org.opencontainers.image.authors="tfirman@fredhutch.org"
LABEL org.opencontainers.image.url=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.documentation=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.authors="wilds@fredhutch.org"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

Expand Down
35 changes: 35 additions & 0 deletions annovar/Dockerfile_hg38
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# Using the Ubuntu base image
FROM ubuntu:noble-20240114

# Adding labels for the GitHub Container Registry
LABEL org.opencontainers.image.title="annovar"
LABEL org.opencontainers.image.description="Container image for the use of Annovar using hg38 in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="hg38"
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

# Installing prerequisites
RUN apt-get update \
&& apt-get install -y build-essential wget perl \
&& rm -rf /var/lib/apt/lists/*

# Pulling and extracting Annovar source code
RUN wget http://www.openbioinformatics.org/annovar/download/0wgxR2rIVP/annovar.latest.tar.gz
RUN tar -xvf annovar.latest.tar.gz
ENV PATH="${PATH}:/annovar"

# Downloading GRCh38 resources
RUN annotate_variation.pl -buildver hg38 -downdb -webfrom annovar refGene /annovar/humandb/
RUN annotate_variation.pl -buildver hg38 -downdb -webfrom annovar knownGene /annovar/humandb/
RUN annotate_variation.pl -buildver hg38 -downdb -webfrom annovar cosmic70 /annovar/humandb/
RUN annotate_variation.pl -buildver hg38 -downdb -webfrom annovar esp6500siv2_all /annovar/humandb/
RUN annotate_variation.pl -buildver hg38 -downdb -webfrom annovar clinvar_20180603 /annovar/humandb/
RUN annotate_variation.pl -buildver hg38 -downdb -webfrom annovar gnomad211_exome /annovar/humandb/

# Cleanup
RUN rm /annovar/humandb/hg19_*
RUN rm -rf annovar.latest.tar.gz
34 changes: 34 additions & 0 deletions annovar/Dockerfile_latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

# Using the Ubuntu base image
FROM ubuntu:noble-20240114

# Adding labels for the GitHub Container Registry
LABEL org.opencontainers.image.title="annovar"
LABEL org.opencontainers.image.description="Container image for the use of Annovar using hg19 in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="latest"
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

# Installing prerequisites
RUN apt-get update \
&& apt-get install -y build-essential wget perl \
&& rm -rf /var/lib/apt/lists/*

# Pulling and extracting Annovar source code
RUN wget http://www.openbioinformatics.org/annovar/download/0wgxR2rIVP/annovar.latest.tar.gz
RUN tar -xvf annovar.latest.tar.gz
ENV PATH="${PATH}:/annovar"

# Downloading GRCh38 resources
RUN annotate_variation.pl -buildver hg19 -downdb -webfrom annovar refGene /annovar/humandb/
RUN annotate_variation.pl -buildver hg19 -downdb -webfrom annovar knownGene /annovar/humandb/
RUN annotate_variation.pl -buildver hg19 -downdb -webfrom annovar cosmic70 /annovar/humandb/
RUN annotate_variation.pl -buildver hg19 -downdb -webfrom annovar esp6500siv2_all /annovar/humandb/
RUN annotate_variation.pl -buildver hg19 -downdb -webfrom annovar clinvar_20180603 /annovar/humandb/
RUN annotate_variation.pl -buildver hg19 -downdb -webfrom annovar gnomad211_exome /annovar/humandb/

# Cleanup
RUN rm -rf annovar.latest.tar.gz
6 changes: 3 additions & 3 deletions Dockerfile_biobambam2 → biobambam2/Dockerfile_2.0.185
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ FROM ubuntu:noble-20240114
LABEL org.opencontainers.image.title="biobambam2"
LABEL org.opencontainers.image.description="Container image for the use of biobambam2 in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="2.0.185"
LABEL org.opencontainers.image.authors="tfirman@fredhutch.org"
LABEL org.opencontainers.image.url=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.documentation=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.authors="wilds@fredhutch.org"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

Expand Down
18 changes: 18 additions & 0 deletions biobambam2/Dockerfile_latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

# Using the Ubuntu base image
FROM ubuntu:noble-20240114

# Adding labels for the GitHub Container Registry
LABEL org.opencontainers.image.title="biobambam2"
LABEL org.opencontainers.image.description="Container image for the use of biobambam2 in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="latest"
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

# Installing biobambam2 via apt-get
RUN apt-get update \
&& apt-get install -y --no-install-recommends biobambam2 \
&& rm -rf /var/lib/apt/lists/*
6 changes: 3 additions & 3 deletions Dockerfile_bwa → bwa/Dockerfile_0.7.17
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ FROM ubuntu:noble-20240114
LABEL org.opencontainers.image.title="bwa"
LABEL org.opencontainers.image.description="Container image for the use of bwa in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="0.7.17"
LABEL org.opencontainers.image.authors="tfirman@fredhutch.org"
LABEL org.opencontainers.image.url=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.documentation=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.authors="wilds@fredhutch.org"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

Expand Down
40 changes: 40 additions & 0 deletions bwa/Dockerfile_latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

# Using the Ubuntu base image
FROM ubuntu:noble-20240114

# Adding labels for the GitHub Container Registry
LABEL org.opencontainers.image.title="bwa"
LABEL org.opencontainers.image.description="Container image for the use of bwa in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="latest"
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

# Installing prerequisites
RUN apt-get update \
&& apt-get install -y build-essential wget zlib1g-dev autoconf automake libncurses5-dev libbz2-dev liblzma-dev libssl-dev libcurl4-gnutls-dev \
&& rm -rf /var/lib/apt/lists/*

# Pulling and extracting bwa source code
RUN wget https://github.com/lh3/bwa/releases/download/v0.7.17/bwa-0.7.17.tar.bz2
RUN tar -jxf bwa-0.7.17.tar.bz2

# Installing bwa
WORKDIR /bwa-0.7.17
RUN make CC='gcc -fcommon'
WORKDIR /
ENV PATH="${PATH}:/bwa-0.7.17"

# Pulling and extracting Samtools source code
RUN wget https://github.com/samtools/samtools/releases/download/1.11/samtools-1.11.tar.bz2
RUN tar -jxf samtools-1.11.tar.bz2

# Installing Samtools
WORKDIR /samtools-1.11
RUN ./configure && make && make install
WORKDIR /

# Cleanup
RUN rm -rf samtools-1.11 samtools-1.11.tar.bz2
6 changes: 3 additions & 3 deletions Dockerfile_gatk → gatk/Dockerfile_4.3.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ FROM continuumio/miniconda3
LABEL org.opencontainers.image.title="gatk"
LABEL org.opencontainers.image.description="Container image for the use of GATK in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="4.3.0.0"
LABEL org.opencontainers.image.authors="tfirman@fredhutch.org"
LABEL org.opencontainers.image.url=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.documentation=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.authors="wilds@fredhutch.org"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

Expand Down
33 changes: 33 additions & 0 deletions gatk/Dockerfile_latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

# Using the Miniconda base image
FROM continuumio/miniconda3

# Adding labels for the GitHub Container Registry
LABEL org.opencontainers.image.title="gatk"
LABEL org.opencontainers.image.description="Container image for the use of GATK in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="latest"
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

# Installing GATK via conda
RUN conda install -c bioconda gatk4=4.3.0.0

# Installing Samtools prerequisites
RUN apt-get update \
&& apt-get install -y build-essential wget zlib1g-dev autoconf automake libncurses5-dev libbz2-dev liblzma-dev libssl-dev libcurl4-gnutls-dev \
&& rm -rf /var/lib/apt/lists/*

# Pulling and extracting Samtools source code
RUN wget https://github.com/samtools/samtools/releases/download/1.11/samtools-1.11.tar.bz2
RUN tar -jxf samtools-1.11.tar.bz2

# Installing Samtools
WORKDIR /samtools-1.11
RUN ./configure && make && make install
WORKDIR /

# Cleanup
RUN rm -rf samtools-1.11 samtools-1.11.tar.bz2
6 changes: 3 additions & 3 deletions Dockerfile_picard → picard/Dockerfile_3.1.1
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ FROM ubuntu:noble-20240114
LABEL org.opencontainers.image.title="picard"
LABEL org.opencontainers.image.description="Container image for the use of Picard in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="3.1.1"
LABEL org.opencontainers.image.authors="tfirman@fredhutch.org"
LABEL org.opencontainers.image.url=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.documentation=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.authors="wilds@fredhutch.org"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

Expand Down
33 changes: 33 additions & 0 deletions picard/Dockerfile_latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

# Using the Ubuntu base image
FROM ubuntu:noble-20240114

# Adding labels for the GitHub Container Registry
LABEL org.opencontainers.image.title="picard"
LABEL org.opencontainers.image.description="Container image for the use of Picard in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="latest"
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

# Installing Java
RUN apt-get update && \
apt-get install -y openjdk-17-jdk && \
apt-get install -y ant && \
apt-get install -y wget && \
apt-get install -y r-base && \
apt-get clean;

# Updating Java certificates
RUN apt-get update && \
apt-get install ca-certificates-java && \
apt-get clean && \
update-ca-certificates -f;
ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64/
RUN export JAVA_HOME

# Pulling Picard jar to a location that will persist in Apptainer
RUN mkdir /usr/picard
RUN wget -P /usr/picard/ https://github.com/broadinstitute/picard/releases/download/3.1.1/picard.jar
6 changes: 3 additions & 3 deletions Dockerfile_samtools → samtools/Dockerfile_1.11
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ FROM ubuntu:noble-20240114
LABEL org.opencontainers.image.title="samtools"
LABEL org.opencontainers.image.description="Container image for the use of Samtools in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="1.11"
LABEL org.opencontainers.image.authors="tfirman@fredhutch.org"
LABEL org.opencontainers.image.url=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.documentation=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.authors="wilds@fredhutch.org"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

Expand Down
30 changes: 30 additions & 0 deletions samtools/Dockerfile_latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

# Using the Ubuntu base image
FROM ubuntu:noble-20240114

# Adding labels for the GitHub Container Registry
LABEL org.opencontainers.image.title="samtools"
LABEL org.opencontainers.image.description="Container image for the use of Samtools in FH DaSL's WILDS"
LABEL org.opencontainers.image.version="latest"
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.url=https://hutchdatascience.org/
LABEL org.opencontainers.image.documentation=https://getwilds.org/
LABEL org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library
LABEL org.opencontainers.image.licenses=MIT

# Installing prerequisites
RUN apt-get update \
&& apt-get install -y build-essential wget zlib1g-dev autoconf automake libncurses5-dev libbz2-dev liblzma-dev libssl-dev libcurl4-gnutls-dev \
&& rm -rf /var/lib/apt/lists/*

# Pulling and extracting Samtools source code
RUN wget https://github.com/samtools/samtools/releases/download/1.11/samtools-1.11.tar.bz2
RUN tar -jxf samtools-1.11.tar.bz2

# Installing Samtools
WORKDIR /samtools-1.11
RUN ./configure && make && make install
WORKDIR /

# Cleanup
RUN rm -rf samtools-1.11 samtools-1.11.tar.bz2

0 comments on commit 69eb86b

Please sign in to comment.