Skip to main content

Find end-of-life Docker base images

org.openrewrite.docker.search.FindEndOfLifeImages

Identifies Docker base images that have reached end-of-life. Using EOL images poses security risks as they no longer receive security updates. Detected images include EOL versions of Debian, Ubuntu, Alpine, Python, and Node.js.

Recipe source

GitHub: FindEndOfLifeImages.java, Issue Tracker, Maven Central

This recipe is available under the Apache License Version 2.0.

Options

TypeNameDescriptionExample
BooleanincludeApproachingOptional. If true, also flag images that will reach EOL within the next 6 months.true

Used by

This recipe is used as part of the following composite recipes:

Usage

This recipe has no required configuration options. It can be activated by adding a dependency on org.openrewrite:rewrite-docker in your build file or by running a shell command (in which case no build changes are needed):

  1. Add the following to your build.gradle file:
build.gradle
plugins {
id("org.openrewrite.rewrite") version("latest.release")
}

rewrite {
activeRecipe("org.openrewrite.docker.search.FindEndOfLifeImages")
setExportDatatables(true)
}

repositories {
mavenCentral()
}

dependencies {
rewrite("org.openrewrite:rewrite-docker:8.73.0")
}
  1. Run gradle rewriteRun to run the recipe.

See how this recipe works across multiple open-source repositories

Run this recipe on OSS repos at scale with the Moderne SaaS.

The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.

Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.

Data Tables

End-of-life Docker images

org.openrewrite.docker.table.EolDockerImages

Records Docker base images that have reached end-of-life.

Column NameDescription
Source fileThe Dockerfile containing the EOL base image.
Stage nameThe build stage name (from AS clause), if specified.
Image nameThe name of the base image.
TagThe image tag.
EOL dateThe date when the image reached end-of-life.
Suggested replacementRecommended newer version to migrate to.