# Docker Repository

In order to create a Tool or Bench image, a Docker image is required to run the application in a containerized environment.\
Illumina Connected Analytics supports both public Docker images and private Docker images uploaded to ICA.

{% hint style="warning" %}
Use Docker images built for x86 architecture or multi-platform images that support x86. You can build Docker images that support [both ARM and X86](https://docs.docker.com/build/building/multi-platform/) structure.
{% endhint %}

## Importing a Public External Image (Tools)

1. Navigate to **System Settings > Docker Repository**.
2. Click **Create > External image** to add a new external image.
3. Add your full image URL in the Url field, e.g. `docker.io/alpine:latest` or `registry.hub.docker.com/library/alpine:latest`. Docker Name and Version will auto-populate. (Tip: do not add http\:// or https\:// in your URL)

{% hint style="warning" %}
Do not use **:latest** when the repository has rate limiting enabled as this interferes with caching and incurs additional data transfer.
{% endhint %}

4. (Optional) Complete the Description field.
5. Click **Save**.
6. The newly added image will appear in your Docker Repository list. You can differentiate between internal and external images by looking at the **Source** column. If this column is not visible, you can add it with the columns icon (<img src="https://3193631692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWUqIqZhOK_i4HqCUpT%2Fuploads%2Fgit-blob-f1cc58eb86016606dd3e18a654e259da98204bf5%2Fimage%20(73).png?alt=media" alt="" data-size="line">).

{% hint style="info" %}
Verification of the URL is performed during execution of a pipeline which depends on the Docker image, not during configuration.
{% endhint %}

{% hint style="info" %}
External images are accessed from the external source whenever required and not stored in ICA. Therefore, it is important **not to move or delete the external source**. There is no status displayed on external Docker repositories in the overview as ICA cannot guarantee their availability.

The use of **:stable** instead of :latest is recommended.
{% endhint %}

## Importing a Private Image (Tools + Bench Images)

In order to use private images in your tool, you must first upload them as a TAR file.

1. Navigate to **Projects > your\_project** .
2. **Upload your private image as a TAR file**, either by dragging and dropping the file in the Data tab, using the CLI or a Connector. For more information please refer to project [Data](https://help.connected.illumina.com/connected-analytics/project/p-data#uploaddata).
3. Select your uploaded TAR file and click in the top menu on **Manage > Change Format** .
4. Select **DOCKER** from the drop-down menu and Save.

   <figure><img src="https://3193631692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWUqIqZhOK_i4HqCUpT%2Fuploads%2Fgit-blob-29ba3981ca862a29b1c3f674c94f34954750ab92%2Fimage%20(1)%20(2)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>
5. Navigate to **System Settings > Docker Repository** (outside of your project).
6. Click on **Create > Image**.
7. Click on the Docker image field. Select the TAR file from the desired region.

<figure><img src="https://3193631692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWUqIqZhOK_i4HqCUpT%2Fuploads%2Fgit-blob-54f089c608563c1a6d86378d21098de95103a155%2Fimage%20(114).png?alt=media" alt=""><figcaption></figcaption></figure>

8. Provide a **name** and **version** for your Docker image, this will automatically populate the global URL field.
9. Select the appropriate region, determine the type (tool or bench image), the [cluster](https://help.connected.illumina.com/connected-analytics/project/p-bench/bench-workspaces) compatibility (only available for bench images), access method and click Save.
10. The newly added image should appear in your Docker Repository list. Verify it is marked as Available under the Status column to ensure it is ready to be used in your tool or pipeline.

## Copying Docker Images to other Regions

1. Navigate to **System Settings > Docker Repository**.
2. Either
   * Select the required image(s) and go to **Manage > Add Region**.
   * OR open the image details, check the box matching the region you want to add, and select **update**.
3. In both cases, allow a few minutes for the image to become available in the new region (the status becomes available in table view).

To **remove regions**, go to **Manage > Remove Region** or unselect the regions from the Docker image detail view.

## Downloading Docker Images

You can download your created Docker images at **System Settings > Docker Images > your\_Docker\_image > Manage > Download**.

In order to be able to download Docker images, the following requirements must be met:

* The Docker image can **not** be from an **entitled** bundle.
* Only **self-created** Docker images can be downloaded.
* The Docker image must be an **internal** image and in status **Available**.
* You can only select a single Docker image at a time for download.
* You need a [**service** **connector**](https://help.connected.illumina.com/connected-analytics/project/p-connectivity/service-connector) with a download rule to download the Docker image.

## File Size Considerations

Docker image size should be kept as small as practically possible. To this end, it is best practice to compress the image. After compressing and uploading the image, select your uploaded file and click **Manage > Change Format** in the top menu to change it to Docker format so ICA can recognize the file.
