|
| 1 | +--- |
| 2 | +title: Get started with DHI Select and Enterprise |
| 3 | +linkTitle: Use DHI Select & Enterprise |
| 4 | +description: Mirror a repository and start using Docker Hardened Images for Select and Enterprise subscriptions. |
| 5 | +keywords: docker hardened images, enterprise, select, mirror, quickstart |
| 6 | +--- |
| 7 | + |
| 8 | +{{< summary-bar feature_name="Docker Hardened Images" >}} |
| 9 | + |
| 10 | +This guide shows you how to get started with DHI Select and Enterprise |
| 11 | +subscriptions. Unlike DHI Community, this workflow lets you mirror repositories |
| 12 | +to your organization namespace on Docker Hub, access compliance variants (FIPS), |
| 13 | +customize images, and get SLA-backed updates. |
| 14 | + |
| 15 | +## Prerequisites |
| 16 | + |
| 17 | +To use this workflow, you need organization owner access in your Docker Hub |
| 18 | +namespace, and one of the following: |
| 19 | + |
| 20 | +- A DHI Select or Enterprise subscription. [Contact Docker |
| 21 | + sales](https://www.docker.com/products/hardened-images/#compare) to purchase |
| 22 | + or learn more about these subscriptions. |
| 23 | +- An active DHI trial. [Start a free DHI |
| 24 | + trial](https://hub.docker.com/hardened-images/start-free-trial). |
| 25 | +- [Docker Desktop](../../desktop/release-notes.md) 4.65 or later to use the |
| 26 | + `docker dhi` CLI. |
| 27 | + |
| 28 | +Each step, when applicable, shows Docker Hub and command line instructions. You |
| 29 | +can use either interface. |
| 30 | + |
| 31 | +## Step 1: Find an image to use |
| 32 | + |
| 33 | +{{< tabs group="interface" >}} |
| 34 | +{{< tab name="Docker Hub" >}} |
| 35 | + |
| 36 | +1. Go to [Docker Hub](https://hub.docker.com/) and sign in. |
| 37 | +2. Select your organization in the left sidebar. |
| 38 | +3. Navigate to **Hardened Images** > **Catalog**. |
| 39 | +4. Use the search bar or filters to find an image (for example, `python`, |
| 40 | + `node`, or `golang`). For this example, search for `python`. |
| 41 | + |
| 42 | + To search for an image with a compliance variant (FIPS or STIG), select |
| 43 | + **Filter by** and select the relevant compliance option. |
| 44 | + |
| 45 | +5. Select the Python repository to view its details. |
| 46 | + |
| 47 | +6. Select **Images** to view available image variants. |
| 48 | + |
| 49 | +{{< /tab >}} |
| 50 | +{{< tab name="Command line" >}} |
| 51 | + |
| 52 | +1. List available image repositories: |
| 53 | + |
| 54 | + ```console |
| 55 | + $ docker dhi catalog list --type image |
| 56 | + ``` |
| 57 | + |
| 58 | +2. To filter by name and FIPS compliance, use the `--filter` and `--fips` flags: |
| 59 | + |
| 60 | + ```console |
| 61 | + $ docker dhi catalog list --filter python --fips |
| 62 | + ``` |
| 63 | + |
| 64 | +3. Get image details for the repository: |
| 65 | + |
| 66 | + ```console |
| 67 | + $ docker dhi catalog get python |
| 68 | + ``` |
| 69 | + |
| 70 | +{{< /tab >}} |
| 71 | +{{< /tabs >}} |
| 72 | + |
| 73 | +Continue to the next step to mirror the image. To dive deeper into exploring |
| 74 | +images see [Explore Docker Hardened Images](explore.md). |
| 75 | + |
| 76 | +## Step 2: Mirror the repository |
| 77 | + |
| 78 | +Mirroring copies a DHI repository into your organization namespace on Docker |
| 79 | +Hub. This lets you receive SLA-backed Docker security patches for your images |
| 80 | +and use customization as well as compliance variants. Only organization owners |
| 81 | +can mirror repositories. |
| 82 | + |
| 83 | +{{< tabs group="interface" >}} |
| 84 | +{{< tab name="Docker Hub" >}} |
| 85 | + |
| 86 | +1. In the image repository details page you found in the previous step, select |
| 87 | + **Use this image** > **Mirror repository**. Note that you must be signed in |
| 88 | + to Docker Hub to perform this action. |
| 89 | +2. Select **Mirror**. |
| 90 | +3. Wait for images to finish mirroring. This can take a few minutes. |
| 91 | +4. Verify the mirrored repository appears in your organization namespace with a |
| 92 | + `dhi-` prefix (for example, `dhi-python`). |
| 93 | + |
| 94 | +{{< /tab >}} |
| 95 | +{{< tab name="Command line" >}} |
| 96 | + |
| 97 | +To use the following commands, you must authenticate or configure DHI CLI |
| 98 | +authentication using your Docker token. For details, see [Use the DHI |
| 99 | +CLI](cli.md#configuration). |
| 100 | + |
| 101 | +1. Start mirroring the repository to your organization namespace. Replace |
| 102 | + `<your-org>` with your organization name. |
| 103 | + |
| 104 | + ```console |
| 105 | + $ docker dhi mirror start --org <your-org> \ |
| 106 | + -r dhi/python,<your-org>/dhi-python |
| 107 | + ``` |
| 108 | + |
| 109 | +2. Wait for images to finish mirroring. This can take a few minutes. |
| 110 | + |
| 111 | +3. Verify the mirrored repository. Replace `<your-org>` with your organization |
| 112 | + name. |
| 113 | + |
| 114 | + ```console |
| 115 | + $ docker dhi mirror list --org <your-org> |
| 116 | + ``` |
| 117 | + |
| 118 | +{{< /tab >}} |
| 119 | +{{< /tabs >}} |
| 120 | + |
| 121 | +Continue to the next step to customize the image. To dive deeper into mirroring |
| 122 | +images see [Mirror a repository](mirror.md). |
| 123 | + |
| 124 | +## Step 3: Customize the image |
| 125 | + |
| 126 | +One of the key benefits of DHI Select and Enterprise is the ability to customize |
| 127 | +your mirrored images. You can add system packages, configure settings, or make other |
| 128 | +modifications to meet your organization's specific requirements. |
| 129 | + |
| 130 | +This example shows how to add the `curl` system package to your mirrored Python image. |
| 131 | + |
| 132 | +{{< tabs group="interface" >}} |
| 133 | +{{< tab name="Docker Hub" >}} |
| 134 | + |
| 135 | +1. Go to your organization namespace on Docker Hub. |
| 136 | +2. Navigate to your mirrored repository (for example, `dhi-python`). |
| 137 | +3. Select **Customizations**. |
| 138 | +4. Select **Create customization**. |
| 139 | +5. Search for `3-alpine3.23` and select any one of the images. |
| 140 | +6. In **Add packages**, select **curl**. |
| 141 | +7. Select **Next: Configure**. |
| 142 | +8. In **Customization name**, enter a name for your customization (for example, `curl`). |
| 143 | +9. Select **Next: Review customization**. |
| 144 | +10. Select **Create customization** to start the build. |
| 145 | + |
| 146 | +It can take a few minutes for the customization to build. Go to the |
| 147 | +**Customizations** tab of your mirrored repository and view the **Last build** |
| 148 | +column to monitor the build status. |
| 149 | + |
| 150 | +{{< /tab >}} |
| 151 | +{{< tab name="Command line" >}} |
| 152 | + |
| 153 | +To use the following commands, you must authenticate or configure DHI CLI |
| 154 | +authentication using your Docker token. For details, see [Use the DHI |
| 155 | +CLI](cli.md#configuration). |
| 156 | + |
| 157 | +1. Create a customization. Replace `<your-org>` with your organization name. |
| 158 | + This creates a file called `my-customization.yaml` with the customization |
| 159 | + details. |
| 160 | + |
| 161 | + ```console |
| 162 | + $ docker dhi customization prepare --org <your-org> python 3-alpine3.23 \ |
| 163 | + --destination <your-org>/dhi-python \ |
| 164 | + --name "python with curl" \ |
| 165 | + --output my-customization.yaml |
| 166 | + ``` |
| 167 | + |
| 168 | +2. Add the `curl` package to the customization. You can edit the file with any |
| 169 | + text or code editor. The following commands use `echo` to add the necessary |
| 170 | + lines to the YAML file: |
| 171 | + |
| 172 | + ```console |
| 173 | + $ echo "contents:" >> my-customization.yaml |
| 174 | + $ echo " packages:" >> my-customization.yaml |
| 175 | + $ echo " - curl" >> my-customization.yaml |
| 176 | + ``` |
| 177 | + |
| 178 | +3. Apply the customization: |
| 179 | + |
| 180 | + ```console |
| 181 | + $ docker dhi customization create --org <your-org> my-customization.yaml |
| 182 | + ``` |
| 183 | + |
| 184 | +4. Verify the customization was created: |
| 185 | + |
| 186 | + ```console |
| 187 | + $ docker dhi customization list --org <your-org> |
| 188 | + ``` |
| 189 | + |
| 190 | +It can take a few minutes for the customization to build. To check the build status: |
| 191 | + |
| 192 | +1. Go to your organization namespace on Docker Hub. |
| 193 | +2. Navigate to your mirrored repository (for example, `dhi-python`). |
| 194 | +3. Select **Customizations**. |
| 195 | +4. View the **Last build** column to monitor the build status. |
| 196 | + |
| 197 | +{{< /tab >}} |
| 198 | +{{< /tabs >}} |
| 199 | + |
| 200 | +To dive deeper into customization, see [Customize a Docker Hardened |
| 201 | +Image](customize.md). |
| 202 | + |
| 203 | +## Step 4: Pull and run your customized image |
| 204 | + |
| 205 | +After the customization build completes, you can pull and run the customized |
| 206 | +image from your organization namespace on Docker Hub. |
| 207 | + |
| 208 | +1. Sign in to Docker Hub: |
| 209 | + |
| 210 | + ```console |
| 211 | + $ docker login |
| 212 | + ``` |
| 213 | + |
| 214 | +2. Pull the customized image from your organization. Replace `<your-org>` with |
| 215 | + your organization name. The customized tag includes the suffix based on your |
| 216 | + customization name. |
| 217 | + |
| 218 | + ```console |
| 219 | + $ docker pull <your-org>/dhi-python:3-alpine3.23_python-with-curl |
| 220 | + ``` |
| 221 | + |
| 222 | +3. Run the image and test that `curl` is installed: |
| 223 | + |
| 224 | + ```console |
| 225 | + $ docker run --rm <your-org>/dhi-python:3-alpine3.23_python-with-curl curl --version |
| 226 | + ``` |
| 227 | + |
| 228 | + This confirms that the `curl` package was successfully added to the image. |
| 229 | + |
| 230 | +To dive deeper into using images, see: |
| 231 | + |
| 232 | +- [Use a Docker Hardened Image](use.md) for general usage |
| 233 | +- [Use in Kubernetes](k8s.md) for Kubernetes deployments |
| 234 | +- [Use a Helm chart](helm.md) for deploying with Helm |
| 235 | + |
| 236 | +## Step 5: Remove customization and stop mirroring |
| 237 | + |
| 238 | +To remove the customization and stop mirroring the repository: |
| 239 | + |
| 240 | +1. Go to your organization namespace on Docker Hub. |
| 241 | +2. Navigate to your mirrored repository (for example, `dhi-python`). |
| 242 | +3. Select **Customizations**. |
| 243 | +4. Find the customization you want to delete (for example, `python with curl`). |
| 244 | +5. Select the trash can icon. |
| 245 | +6. Select **Delete customization** to confirm the deletion. |
| 246 | +7. To stop mirroring, go back to your organization's repositories list. |
| 247 | +8. Find the mirrored repository (for example, `dhi-python`). |
| 248 | +9. Select **Settings**. |
| 249 | +10. Select **Stop mirroring**. |
| 250 | +11. Select **Stop mirroring** to confirm. |
| 251 | + |
| 252 | +## What's next |
| 253 | + |
| 254 | +You've mirrored, customized, and run a Docker Hardened Image. Here are a few ways to keep going: |
| 255 | + |
| 256 | +- [Migrate existing applications to DHIs](../migration/migrate-with-ai.md): Use |
| 257 | + Gordon to update your Dockerfiles to use Docker Hardened Images as the base. |
| 258 | + |
| 259 | +- [Verify DHIs](verify.md): Use tools like [Docker Scout](/scout/) or Cosign to |
| 260 | + inspect and verify signed attestations, like SBOMs and provenance. |
| 261 | + |
| 262 | +- [Scan DHIs](scan.md): Analyze the image with Docker Scout or other scanners |
| 263 | + to identify known CVEs. |
0 commit comments