Skip to content

Parse RUN apk add ...s from Dockerfiles #43711

@jamietanna

Description

@jamietanna

Something we see users hit over time is that they'd like to have i.e. a Dockerfile parsed so they can take i.e.

RUN apk upgrade --no-cache && \
    apk add --no-cache \
        bash=5.2.37-r2 \
        py3-pip \
        python3 \
        rsyslog=8.2412.0-r1 \
        runit=2.2.0

And have Renovate update those specific versions.

I've previously ended up writing a custom manager for this, but it'd be best if we could provide this by default, especially as Renovate's parsing of the lines will be more effective (and can perform more intelligent parsing) than a pure regex can.

This will be something to parse by default, but will not provide any lookups.

It's not straightforward to automagically detect the flavour of Linux distribution from the Docker image name, and there may be cases where a user would prefer to use an internal mirror of the registry for lookups.

We may provide defaults that will detect known distributions from their Docker image name and wire in the registryUrls, but not as part of this.

This will allow us to perform the extraction, and then the lookup will be based on the configured registryUrls (and datasource=apk)

(I've been meaning to raise this for some time, and it depends on #40250, and related to #43703)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Priority

    None yet

    Datasource

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions