Skip to content

Commit 5ea24c5

Browse files
boomanaiden154github-actions[bot]
authored andcommitted
Automerge: [CI][Github] Add Fully Qualified Container Names to Best Practices (#165067)
Based on some recent discussion in #162007. Documenting this in the best practices page so we have something easy to point to in code review/reference for ourselves now that the repository has been cleaned up.
2 parents e983077 + fd804f0 commit 5ea24c5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

llvm/docs/CIBestPractices.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,20 @@ branches as follows:
136136
branches:
137137
- main
138138
- releases/*
139+
140+
Container Best Practices
141+
========================
142+
143+
This section contains best practices/guidelines when working with containers
144+
for LLVM infrastructure.
145+
146+
Using Fully Qualified Container Names
147+
-------------------------------------
148+
149+
When referencing container images from a registry, such as in Github Actions
150+
workflows, or in ``Dockerfile`` files used for building images, prefer fully
151+
qualified names (i.e., including the registry domain) over just the image.
152+
For example, prefer ``docker.io/ubuntu:24.04`` over ``ubuntu:24.04``. This
153+
ensures portability across systems where a different default registry might
154+
be specified and also prevents attackers from changing the default registry
155+
to pull in a malicious image instead of the intended one.

0 commit comments

Comments
 (0)