> For the complete documentation index, see [llms.txt](https://academy.dnanexus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.dnanexus.com/docker/usingdocker.md).

# Using Docker

## Why Docker?

* **Portability** - Run code and scripts on any machine that has Docker installed
  * Avoids installation headaches on multiple machines (dependencies are installed with software)
  * **Make it easy to run batch jobs on multiple instances**
* **Reproducibility** - be able to run code and generate the same outputs given a set of input files
  * **Tie all software to specific versions**
  * Utilize Docker images with multiple bioinformatics software installed
  * Examples: [Rocker Project](https://rocker-project.org/),  [GATK4](https://hub.docker.com/r/broadinstitute/gatk/)

## Docker Terms

* Docker Registries
  * Collection of repositories that hold container images
  * docker pull: pulls the images from a registry to a container on our machine
  * docker commit: When we commit changes, these changes are saved to the image in registry

![](https://1979569080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPtCOm9rXoRi4P9rh1ET8%2Fuploads%2Fgit-blob-459e877a14e99a3209fdf18ea9312e4d39d7ea1f%2FDocker_Terms.png?alt=media)

## Snapshots vs Images on the Platform

There are hard limits for using Docker Images.

* DockerHub and other registries have a pull limit of 200 pulls/user/day
* Saving a snapshot file to your project lets you scale without these limits
* Especially helpful in batch processing

## Docker and Security

* Use images from trusted vendors whenever possible
  * Examples: Official Ubuntu Image, Amazon Linux Image, Biocontainers
  * Avoid "kitchen sink" images - hard to manage vulnerabilities
* In general: **pay attention to possible vulnerabilities and whether they affect your containers**&#x20;
* Use dockerfiles to uninstall/patch possible vulnerabilities in images

## Resources

[Full Documentation](https://documentation.dnanexus.com/)

To create a support ticket if there are technical issues:

1. Go to the Help header (same section where Projects and Tools are) inside the platform
2. Select "Contact Support"
3. Fill in the Subject and Message to submit a support ticket.
