# Viewing and downloading container artifacts

For a workspace that writes the destination data to container artifacts, **Outputs** view displays a list of the generated data volumes.

For each data volume, it also provides access to

* The digest you use to download the data volume from the registry.
* A Docker Compose file template to help you to stand up a database with a volume mount that uses the generated data volume.

## Viewing the list of generated container artifacts <a href="#workspace-outputs-container-artifacts" id="workspace-outputs-container-artifacts"></a>

When the workspace is configured to write the destination data to a container repository, **Outputs** view provides access to the generated data volumes.

On **Outputs** view, each entry represents a data volume created by a data generation job. The volumes that were generated most recently are at the top of the list.

### Information in the list <a href="#container-artifacts-list-information" id="container-artifacts-list-information"></a>

For each volume, the list contains:

* The image that the volume was based on.
* The assigned tags.
* The identifier of the job.
* When the artifact was created.
* The user who ran the job that created the artifact.

### Viewing details for an artifact <a href="#container-artifact-list-details-panel" id="container-artifact-list-details-panel"></a>

To view the details about a data volume, click the details icon. The details panel contains:

* The job identifier.
* The assigned tags.
* When the volume was created.
* Who created the volume.
* The full registry and reference path to the volume.

From the artifact details panel, you can:

* Copy the job identifier.
* Display the job details view.
* Download the Compose file for the volume.
* Copy the digest for the volume. You use the digest to download the data volume from the registry.

## Obtaining container artifacts <a href="#container-artificats-obtain" id="container-artificats-obtain"></a>

For each data volume, you use the digest to retrieve the data volume from the registry. The Docker Compose file provides authentication information for the data on the data volume.

### Copying the volume digest <a href="#container-artifacts-copy-digest" id="container-artifacts-copy-digest"></a>

To copy the volume digest for a generated data volume:

1. On **Outputs** view, click the details icon for the data volume.
2. On the details panel, click the copy digest button.

### Obtaining the data volume from the registry <a href="#container-artifacts-get-volume" id="container-artifacts-get-volume"></a>

Use the volume digest to pull the data volume from the registry.

Because this is a data volume and not an image, you must use a tool such as the [ORAS CLI](https://oras.land/docs/category/oras-commands/).

The data volume downloads as a .tar.gz file.

Extract the downloaded file to your local machine.

Here is a basic example of downloading and extracting the volume:

```bash
# Pull by tag
oras pull <registry>/<repository>:<tag>

# Pull by digest
oras pull <registry>/<repository>@<digest>

# Extract the data volume
# When you extract the tar, preserve the permissions and owners
# Note: --same-owner is specific to GNU TAR
tar --same-owner -xvf datavol.tar.gz
```

### Downloading and updating the Docker Compose file <a href="#container-artifacts-get-configure-compose-file" id="container-artifacts-get-configure-compose-file"></a>

The Docker Compose file helps to generate a database from the data volume. It includes the database user password. The username is the default user for the database platform:

* For PostgreSQL, `postgres`
* For MySQL, `root`
* For SQL Server, `sa`

#### Downloading the file <a href="#container-artifacts-compose-download" id="container-artifacts-compose-download"></a>

You can download the Docker Compose file for a job from the jobs list, the job details view, or the **Outputs** view.

From the job list:

1. Click the download icon in the far right column.
2. Select **Volume** **Compose File**.

From the job details view, under **Generated Artifacts**, click **Compose File**.

From **Outputs** view:

1. Click the details icon for the data volume.
2. On the details panel, click the download icon.

#### Updating the file with the volume path <a href="#container-artifacts-compose-update" id="container-artifacts-compose-update"></a>

In the `volumes` section of the Compose file, replace the template path value with the path to the extracted data volume.
