Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f46085be
Commit
f46085be
authored
Feb 05, 2020
by
Nicolò Maria Mezzopera
Committed by
Achilleas Pipinellis
Feb 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docker container expiration policy docs
- add section: understanding the logic
parent
e0eb91a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
doc/user/packages/container_registry/index.md
doc/user/packages/container_registry/index.md
+12
-0
No files found.
doc/user/packages/container_registry/index.md
View file @
f46085be
...
@@ -336,6 +336,18 @@ error during connect: Get http://docker:2376/v1.39/info: dial tcp: lookup docker
...
@@ -336,6 +336,18 @@ error during connect: Get http://docker:2376/v1.39/info: dial tcp: lookup docker
It is possible to create a per-project expiration policy, so that you can make sure that
It is possible to create a per-project expiration policy, so that you can make sure that
older tags and images are regularly removed from the Container Registry.
older tags and images are regularly removed from the Container Registry.
The expiration policy algorithm starts by collecting all the tags for a given repository in a list,
then goes through a process of excluding tags from it until only the ones to be deleted remain:
1.
Collect all the tags for a given repository in a list.
1.
Excludes the tag named
`latest`
from the list.
1.
Evaluates the
`name_regex`
, excluding non-matching names from the list.
1.
Excludes any tags that do not have a manifest (not part of the options).
1.
Orders the remaining tags by
`created_date`
.
1.
Excludes from the list the N tags based on the
`keep_n`
value (Expiration latest).
1.
Excludes from the list the tags older than the
`older_than`
value (Expiration interval).
1.
Finally, the remaining tags in the list are deleted from the Container Registry.
### Managing project expiration policy through the API
### Managing project expiration policy through the API
You can set, update, and disable the expiration policies using the GitLab API.
You can set, update, and disable the expiration policies using the GitLab API.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment