Comment on page
Run Docker containers within DNAnexus applications.
Docker images provide a way to encapsulate files, configurations, and dependencies of a particular application (typically a command-line tool) in a single place. These images can be shared via registries in the cloud and this approach for sharing applications and dependencies has become increasingly popular the last few years. DNAnexus supports executing Docker containers using the native CLI in Ubuntu 16.04 and Ubuntu 20.04 Application Execution Environments.
- You can use Docker just like you normally do on a CLI.
- To connect to a private registry you will need to place credentials to access the registry somewhere in your project and/or provide a file with credentials as an input. Anyone with VIEW access to the project also has access to read the Docker image from your private registry. After obtaining the credentials, log into your registry as usual.
- If you would like to cache your Docker image for use independent of a registry, it is recommended to use the typical
docker savewill create a tarball of your image which you can include in a DNAnexus Asset or as a parameter to your app. In your app, simply run
docker loadon the tarball instead of
- Some advantages to storing images within projects on the platform:
- The applet does not need network access to obtain the image which avoids networking and other maintenance issues that can occur by relying on a third-party repository.
- You can obtain images much more efficiently when within the cloud due to fast network speeds and the region locality of the project.
- Private images stored within applets or projects naturally inherit access/permission of the project.