loopback-next icon indicating copy to clipboard operation
loopback-next copied to clipboard

Use FQIN in Dockerfile

Open achrinza opened this issue 2 years ago • 0 comments

Historically, we have used Unqualified Image Names. However, this is insecure as it is ambiguous on registry to use. Fully Qualified Image Names (FQIN) make explicit the domain name of the registry to pull from.

Change details

For Dockerfiles, the general update will be:

+ FROM docker.io/library/node:18-slim
- FROM node:18-slim

Although there is special-handling for the docker.io registry that allows omission of /library namespace path prefix for "no-namespace" images, we should use the full FQIN so as to be consistent with the output of other utilities such as podman image ls.

Impact

Other than updated Dockerfiles, there should be no other noticeable impact.

Files to update

References

  • https://github.com/search?q=org%3Aloopbackio%20language%3ADockerfile&type=code
  • https://github.com/search?q=org%3Aloopbackio+%22FROM+node%3A%22&type=code
  • https://github.com/containers/image/blob/95a2847696c8583d5bed0ce71fed3a32276aa870/docs/containers-registries.conf.5.md#note-risk-of-using-unqualified-image-names

Similar changes in other projects

  • https://github.com/NetApp/trident/pull/690
  • https://github.com/ceph/ceph-csi/pull/1715
  • https://github.com/hedgedoc/container/pull/437

achrinza avatar Aug 13 '23 05:08 achrinza