Skip to content

Lightweight Alpine-based Docker images for common bioinformatics tools

Notifications You must be signed in to change notification settings

stephenturner/slimbioinfo

Repository files navigation

slimbioinfo

Slim Docker images for bioinformatics tools built on Alpine Linux (mostly).

Building

Build a single image:

docker build --no-cache -t imagename

Push to Docker Hub:

# docker login
docker tag imagename username/imagename
docker push username/imagename

Build all images:

USERNAME="stephenturner"
echo '#!/bin/bash' > BUILD.sh
find . -type f -name "Dockerfile" -exec dirname {} \; \
    | sort \
    | sed  's/\.\///g' \
    | xargs -I{} echo "docker build --no-cache -t ${USERNAME}/{} {}/" \
    >> BUILD.sh
bash build.sh

Usage

Run an executable from the image mounting the local current working directory to /data:

docker run --rm -u $(id -u):$(id -g) -v $(pwd):$(pwd) -w $(pwd) imagename

Create an alias to make this a little easier. Put this in your ~/.bashrc:

function docker_run { docker run --rm -u $(id -u):$(id -g) -v $(pwd):$(pwd) -w $(pwd) "$@"; }

Then:

docker_run imagename

Run multiple piped commands inside the container. Example with bcftools assuming example.vcf.gz lives in the current working directory:

docker run --rm -u $(id -u):$(id -g) -v $(pwd):$(pwd) -w $(pwd) --entrypoint /bin/ash stephenturner/bcftools -c \
    "bcftools view -r 1 example.vcf.gz | bcftools query -f '%CHROM\t%POS\t[%TGT]\n'"

Step inside a container:

docker run --rm -it --entrypoint /bin/ash imagename

About

Lightweight Alpine-based Docker images for common bioinformatics tools

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published