Snyk Documentation

Docker Hub—integrate and test

Snyk integrates with Docker Hub to enable you to import snapshots of your projects to our UI and then test and monitor image layers directly from your registries.

This section describes:

Configure integration for Docker Hub

Enable integration between Docker Hub and Snyk, and start managing your vulnerabilities.

    1. From the Snyk UI, log in to your account and navigate to Integrations from the menu bar at the top.
    2. From the Integrations page under the Docker Hub logo, click the Connect to Docker Hub button:
    3. From the Settings page in the Integrations area, enter your Docker Hub username and password and then click Save:
      Snyk tests the connection values and the page reloads, now displaying Docker Hub integration information and the Add your Docker Hub images to Snyk button.
      A confirmation message that the details were saved also appears in green at the top of the screen. In addition, if the connection to Docker Hub failed, a notification appears.
    4. Now, add images for testing and monitoring. Click Add your Docker Hub images to Snyk.
      The Add Projects view appears, displaying all repos from your Docker Hub account. Go to Add projects and images to the Snyk UI to continue.
    5. Additionally, you can now connect your Git repo to this project in order to use your Dockerfile for enriched remediation advice. For more info, see Add your Dockerfile for base image remediation.

Add projects and images to the Snyk UI

Snyk tests and monitors Docker Hub repositories and images by evaluating root folders.

To add repositories to Snyk:

Note: If you already clicked Add your Docker Hub images button from the Settings page, you can start with step 3.

        1. Go to Projects and click Add projects.
        2. From the page that loads, click the Docker Hub option:
        3. The Add Projects view appears, displaying all users, organizations and images from your Docker Hub account, similar to the following:
        4. Checkmark the relevant images for import and monitoring.
        5. Click Add selected images to Snyk.
          Snyk tests the images and also imports them to the UI.
          Once repositories and images are imported, a confirmation appears in green at the top of the screen. Docker Hub files are indicated with a unique icon .

          You can now also filter to view only those projects:

      Docker Hub integration works similar to our other integrations. To continue to monitor, remediate and manage your projects, see the relevant pages in our docs.