<aside> 🐳

We use Docker to establish consistent environments (containers) for commonly used pipelines. Images live on Docker Hub under the organization name zamanianlab, and can be loaded directly from Docker Hub in our CHTC submit scripts.

</aside>

The Dockerfiles used to create these images are maintained in our lab Docker repo on GitHub. Install Docker Desktop for Mac and create a Docker Hub account to be associated with our organization (zamanianlab).

<aside> ⚠️

Needs update. The old docs linked the Dockerfile repo as github.com/zamanianlab/Docker Install — a URL with a space in it, which never resolved. Replace with the correct repo name.

</aside>

Building Docker images

1. Create a lab Docker Hub repo (zamanianlab/{pipeline}), associated with a GitHub repo called {pipeline}.

2. Create the Dockerfile and auxiliary files in a folder with the repo name in the lab Docker GitHub repo.

The Dockerfile provides instructions to build a Docker image. Here we start with the official miniconda image and install the necessary conda packages into it. You can search Docker Hub for existing images to build on instead of starting from scratch.

The yml file lists conda packages to be installed. You can search for packages on Anaconda cloud.

3. Build the Docker image (provide a version number):

cd [/path/to/Dockerfile]
docker build -t zamanianlab/chtc-rnaseq:v4 .

4. Test the image interactively (Ctrl-D to exit):

docker run -it --rm=TRUE zamanianlab/chtc-rnaseq:v4 /bin/bash

5. Push the image to Docker Hub:

docker push zamanianlab/chtc-rnaseq:v4

Testing pipelines locally

You may want to test a pipeline or Docker environment locally using subsampled data before pushing to GitHub/Docker Hub for deployment on CHTC with large datasets.