> 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

![](/files/pfRlBFSXZ7SgNZo4Mo67)

## 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.
