Skip to content

Use of FQIN in Dockerfile FROM instructions. #23954

Closed
@gitouche-sur-osm

Description

@gitouche-sur-osm

Feature Description

This is a request for the use of Fully Qualified Image Names (FQIN) in Dockerfile FROM instructions.
eg. FROM alpine:3.17 -> FROM docker.io/library/alpine:3.17

The use of short names is ambiguous as the registry it pulls from might depend on docker (or alternative build system) configuration. This is better explained in containers-registries.conf man page.

Docker uses hardcoded configuration in order to search for short names on docker.io registry :

echo $(docker info | grep -oP "(?<=Registry: ).*")
https://index.docker.io/v1/

But this behaviour might be different if registry-mirrors is set in docker daemon.json.

This would also improve support for docker alternatives as well (e.g. buildah, where the docker.io HUB might not be the default registry), while staying 100% docker compatible.

Lines that would need patching :

FROM golang:1.20-alpine3.17 AS build-env

FROM alpine:3.17

FROM golang:1.20-alpine3.17 AS build-env

FROM alpine:3.17

Thank you for considering this request.

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueLikely to be an easy fixtype/featureCompletely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions