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
6bf5da57
Commit
6bf5da57
authored
Nov 17, 2020
by
Tim Rizzi
Committed by
Suzanne Selhorn
Nov 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Docs feedback: registry garbage collector"
parent
e72e55c6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
doc/administration/packages/container_registry.md
doc/administration/packages/container_registry.md
+10
-6
doc/user/packages/container_registry/index.md
doc/user/packages/container_registry/index.md
+1
-1
No files found.
doc/administration/packages/container_registry.md
View file @
6bf5da57
...
...
@@ -829,11 +829,11 @@ If you changed the location of the Container Registry `config.yml`:
sudo
gitlab-ctl registry-garbage-collect /path/to/config.yml
```
You may also
[
remove all un
referenced manifests
](
#removing-unused-layers-not-referenced-by-manifest
s
)
,
You may also
[
remove all un
tagged manifests and unreferenced layers
](
#removing-untagged-manifests-and-unreferenced-layer
s
)
,
although this is a way more destructive operation, and you should first
understand the implications.
### Removing un
used layers not referenced by manifest
s
### Removing un
tagged manifests and unreferenced layer
s
> [Introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/3097) in Omnibus GitLab 11.10.
...
...
@@ -841,11 +841,11 @@ DANGER: **Warning:**
This is a destructive operation.
The GitLab Container Registry follows the same default workflow as Docker Distribution:
retain
all layers, even ones that are unreferenced directly to allow a
ll content
to be accessed
using context addressable identifiers.
retain
untagged manifests and all layers, even ones that are not referenced directly. A
ll content
can be accessed by
using context addressable identifiers.
However, in most workflows, you don't care about old layers if they are not directly
referenced by
the registry tag
. The
`registry-garbage-collect`
command supports the
However, in most workflows, you don't care about
untagged manifests and
old layers if they are not directly
referenced by
a tagged manifest
. The
`registry-garbage-collect`
command supports the
`-m`
switch to allow you to remove all unreferenced manifests and layers that are
not directly accessible via
`tag`
:
...
...
@@ -853,6 +853,8 @@ not directly accessible via `tag`:
sudo
gitlab-ctl registry-garbage-collect
-m
```
Without the
`-m`
flag, the Container Registry only removes layers that are not referenced by any manifest, tagged or not.
Since this is a way more destructive operation, this behavior is disabled by default.
You are likely expecting this way of operation, but before doing that, ensure
that you have backed up all registry data.
...
...
@@ -946,6 +948,8 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
5 4
*
*
0 root gitlab-ctl registry-garbage-collect
```
You may want to add the
`-m`
flag to
[
remove untagged manifests and unreferenced layers
](
#removing-untagged-manifests-and-unreferenced-layers
)
.
## Troubleshooting
Before diving in to the following sections, here's some basic troubleshooting:
...
...
doc/user/packages/container_registry/index.md
View file @
6bf5da57
...
...
@@ -447,7 +447,7 @@ For the project where it's defined, tags matching the regex pattern are removed.
The underlying layers and images remain.
To delete the underlying layers and images that aren't associated with any tags, administrators can use
[
garbage collection
](
../../../administration/packages/container_registry.md#removing-un
used-layers-not-referenced-by-manifest
s
)
with the
`-m`
switch.
[
garbage collection
](
../../../administration/packages/container_registry.md#removing-un
tagged-manifests-and-unreferenced-layer
s
)
with the
`-m`
switch.
### Enable the cleanup policy
...
...
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