# Creating Docker Snapshots

This is a walk through of how to add an existing Docker Image to the platform and saving it as a snapshot file on the platform

To get started with this, you will either need to 1) open a ttyd or 2) have Docker installed and use you local terminal with dxtoolkit installed as well.

## Overview of How to Use the Docker Image to Snapshot File

![](/files/GzhmlLIpDwccADTqImFU)

## Example of the Code in Action

1. You have to pull the Docker image from the registry to the platform. For this example, the code is

```{bash}
docker pull broadinstitute/gatk 
```

That results in this view:

![](/files/V67B62XziiiqLfHu5vZe)

Notice that you will have extract and then pull complete on each of the "layers" of the image on the left hand side. This takes a few minutes depending on the size of the docker image

2. Now you have to save this docker image file. For this example, the code is

```{bash}
docker save broadinstitute/gatk -o gatk.tar.gz
```

This again takes time depending on the size of your docker file.

3. Now you will need to upload this image back to the platform. For this example, the code is:

```{bash}
dx upload gatk.tar.gz 
```

The last 2 steps have the following output:

![](/files/ipH3lLiKiBwAbRD5fuCb)

It should then be in the project space that you have chosen. You can also check this in the GUI.

Example:

![](/files/H5n5ZAtFOG8lfbW48oWv)

## Resources

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

[Using Docker Images](https://documentation.dnanexus.com/developer/apps/dependency-management/using-docker-images)

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://academy.dnanexus.com/docker/creating_docker_snapshots.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
