Use of FQIN in Dockerfile FROM instructions #1625

Closed
opened 2026-04-06 02:06:20 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @gitouche-sur-osm on 5/1/2023

Subject of the issue

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

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 registry might not be the default registry), while staying 100% docker compatible.

File that needs changes : docker/Dockerfile.j2

See the changes in my fork : https://github.com/dani-garcia/vaultwarden/compare/main...gitouche-sur-osm:vaultwarden:main#diff-4331345734d1b2a2578682b272eae8952289a0cffb0b5b6dd118f40802a4d055

Would you consider a PR for this?
Thank you for considering this request.

*Originally created by @gitouche-sur-osm on 5/1/2023* <!-- # ### NOTE: Please update to the latest version of vaultwarden before reporting an issue! This saves you and us a lot of time and troubleshooting. See: * https://github.com/dani-garcia/vaultwarden/issues/1180 * https://github.com/dani-garcia/vaultwarden/wiki/Updating-the-vaultwarden-image # ### --> <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them. Remember to hide/redact personal or confidential information, such as passwords, IP addresses, and DNS names as appropriate. --> ### Subject of the issue This is a request for the use of `Fully Qualified Image Names (FQIN)` in Dockerfile `FROM` instructions. e.g. `FROM alpine` -> `FROM docker.io/library/alpine` 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](https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#note-risk-of-using-unqualified-image-names). 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 registry might not be the default registry), while staying 100% docker compatible. File that needs changes : `docker/Dockerfile.j2` See the changes in my fork : https://github.com/dani-garcia/vaultwarden/compare/main...gitouche-sur-osm:vaultwarden:main#diff-4331345734d1b2a2578682b272eae8952289a0cffb0b5b6dd118f40802a4d055 Would you consider a PR for this? Thank you for considering this request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1625