This repo houses definitions for the Docker images used by PacBio workflows.
Docker image definitions are found in the docker directory.
Each Docker image must minimally define a build.env
file.
Example directory structure:
docker/
├── bwa_mem/
│ ├── build.env
│ └── Dockerfile
├── Conda_dockerfile # a template dockerfile, used to build multiple images
├── htslib/
│ └── build.env # Uses the Conda_dockerfile
├── pb_human_wgs_scripts/
│ ├── build.env
│ └── Dockerfile
├── samtools/
│ ├── build.env
│ ├── Dockerfile
│ └── scripts/
└── yak
└── build.env # Uses the Conda_dockerfile
Each target image is defined via the presence of a build.env
file, which is used to specify the name and version tag for the corresponding Docker image. It must contain at minimum the following variables:
IMAGE_NAME
IMAGE_TAG
All variables defined in the build.env
file will be made available as build arguments during Docker image build.
The IMAGE_TAG
variable can be built using other variables defined in the build.env
file, as long as those other variables are defined before IMAGE_TAG
. For example, the following IMAGE_TAG
would be set to 0.7.8_1.15
:
# Tool verisons
BWA_VERSION=0.7.8
SAMTOOLS_VERSION=1.15
# Image info
IMAGE_NAME=bwa_samtools
IMAGE_TAG=${BWA_VERSION}_${SAMTOOLS_VERSION}
The Dockerfile
corresponding to a build.env
must either:
- Be named
Dockerfile
and exist in the same directory as thebuild.env
file, or - Be specified using the
DOCKERFILE
variable in thebuild.env
file (e.g. for image builds that reuse a common Dockerfile). The path to the Dockerfile should be relative to the directory containing thebuild.env
file.
These variables have special meanings when the Docker image is being built. † specifies that the variable is required.
IMAGE_NAME
†: specifies the name of the built imageIMAGE_TAG
†: specifies the tag of the built imageNOBUILD
: When set totrue
, skip building this imageDOCKERFILE
: Specify an alternate path to a Dockerfile, relative to thebuild.env
file. If left undefined, the Dockerfile must be namedDockerfile
and be present at the same directory level as the correspondingbuild.env
file.CONDA_ENVIRONMENT_TEMPLATE
: For conda-based images, set this to the path (relative to thebuild.env
file) to the conda environment template file. This file may have variables set in place of tool versions and will be populated with the variables frombuild.env
at build time.
Docker images can be built using the build_docker_images utility script.
./util/build_docker_images -d docker/smrtcell_stats
./util/build_docker_images -d docker
./util/build_docker_images -d docker -p
./util/build_docker_images -d docker -p -c pacbio