Skip to content

Latest version placeholder #1816

Description

@francislavoie

I originally asked about this here #1802 (comment) but I didn't get an answer, so I figured I'd open an issue instead to discuss it.

Is there any way to dynamically replace this <version> with a placeholder? I dug through the scripts in this repo and I didn't find any relevant placeholders.

Ideally, I'd like a %%LATEST_VERSION%% placeholder that would basically be the version number that the latest tag shares.

I've already gotten a question from a user recently who is new to Docker asking "do I need to replace <version>?" so I think this should be improved.

I realize that this is probably non-trivial because the latest tag doesn't directly map to a specific version because of how tagging works. Maybe there's a way to hook into the docs generator to provide additional placeholders? We could write a simple script that extracts the relevant info based on some heuristic.

Activity

  1. yosifkit commented on Oct 14, 2020

    @yosifkit
    Member

    Yeah, it is a bit hard to find which tag is the most equivalent to latest (or generally, getting the "most specific" tag from any less specific tag). While we usually order our tags from most specific to least, not all images follow this unspoken convention. So, we could guess by taking the first tag in the Tags: list, but should the docs really be changed for every minor version bump?

    Then there is the issue of latest being a "Shared Tag" and so can appear more than once in the library file (like python on line 38, line 54, and line 61) and so even bashbrew list doesn't give us a canonical answer:

    $ bashbrew list python:latest
    python:3.9.0-buster
    python:3.9-buster
    python:3-buster
    python:buster
    python:3.9.0
    python:3.9
    python:3
    python:latest
    python:3.9.0-windowsservercore-ltsc2016
    python:3.9-windowsservercore-ltsc2016
    python:3-windowsservercore-ltsc2016
    python:windowsservercore-ltsc2016
    python:3.9.0-windowsservercore
    python:3.9-windowsservercore
    python:3-windowsservercore
    python:windowsservercore
    python:3.9.0
    python:3.9
    python:3
    python:latest
    python:3.9.0-windowsservercore-1809
    python:3.9-windowsservercore-1809
    python:3-windowsservercore-1809
    python:windowsservercore-1809
    python:3.9.0-windowsservercore
    python:3.9-windowsservercore
    python:3-windowsservercore
    python:windowsservercore
    python:3.9.0
    python:3.9
    python:3
    python:latest
    $ bashbrew list --uniq python:latest
    python:3.9.0-buster
    python:3.9.0-windowsservercore-ltsc2016
    python:3.9.0-windowsservercore-1809

    I think we end up just putting a major version and then eventually updating the doc when that version is no longer supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions