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:

Example

Parameters
ParameterValue
includeApproachingnull
Before
FROM debian:buster
RUN apt-get update
After
~~(EOL: debian:buster (ended 2024-06-30, suggest trixie (13) or bookworm (12)))~~>FROM debian:buster
RUN apt-get update

Usage

This recipe has no required configuration options. Users of Moderne can run it via the Moderne CLI.

You will need to have configured the Moderne CLI on your machine before you can run the following command.

shell
mod run . --recipe FindEndOfLifeImages

If the recipe is not available locally, then you can install it using:

mod config recipes jar install org.openrewrite:rewrite-docker:8.73.2

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.