Snyk Documentation

Add your Dockerfile for base image remediation

To receive base image remediation advice, including major, minor and alternative upgrades as well as advice when you need to rebuild your image, integrate with your preferred Git repository and import the repo that contains the relevant Dockerfile.

Supported repos

  • GitHub
  • GitHub Enterprise
  • GitLab
  • Bitbucket Cloud

Prerequisites

  • Ensure the account that you integrate Snyk with contains the relevant Dockerfile repository.
  • Configure the integration for the Git that contains your Dockerfile prior to this process.
  • Ensure you have already imported the relevant container project for monitoring. See Container Vulnerability Management for more info.

Configure your Dockerfile

  1. From the Project tab, filter for your project and then click the settings cog to access the settings to add a Dockerfile:
  2. From the Project settings page, click Configure Dockerfile and then select the relevant Git:
  3. The Add Projects view appears, displaying all repositories from the Git account with which you integrated, grouped per organization and personal account:
  4. Checkmark the relevant repo from which to import the Dockerfile.
    Step 2 loads:
  5. Enter the relative path in the Path to your Dockerfile field in the following format: /path/dockerfile.
  6. Click Save.
    Snyk tests the project again, this time producing any relevant base image remediation advice such as in the following example:

Container integrations work similarly to our other integrations. To continue to monitor, remediate and manage your projects, see the relevant pages in our docs.