►
From YouTube: Understanding the Container Registry data structure
Description
Set up GDK: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/set-up-gdk.md
Set up Container Registry: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/howto/registry.md
A
Okay,
so
my
name
is
Rob
beretta
I'm,
a
packet
engineer
on
the
package
team
at
it
like
I
work
with
the
container
registry,
and
we
are
recording
this
session
so
that
we
can
give
an
explanation
about
registry,
the
data
structure
and
how
images
are
stored
on
the
file
system,
and
we
will
also
see
our
data
correlates
with
the
key
fob,
UI
and
information
that
we
see
on
to
eat.
Love
you
I
know.
If
you
want
to
introduce
yourself.
B
A
Ok,
so
the
setup
that
I
fear
is
built
with
using
the
GDK,
so
anyone
can
reproduce
what
we
are
going
to
do
here.
If
you
don't
have
GDK
setup,
you
can
do
so
following
the
instructions
on
the
official
repository
and
it's
also
necessary
to
do
the
setup
for
the
registry,
which
you
will
also
find
the
instructions
on
the
on
the
roof
secret.
Ok,
so
just
follow
the
instructions
to
setup
and
then
the
instructions
to
turn
on
the
registry
as
well.
A
Then
we
are
going
to
use
a
sample
project
which
comes
with
the
GDK
and
that's
the
key
to
our
test
project
inside
the
organization.
We
can
see
that
right
now
there
are
no
images
on
this
registry.
So
what
we
are
going
to
do
is
build
some
images
for
this
and
see
how
that
appears
on
the
file
system
for
the
registry
and
then
see
what
information
we
can
correlate
between
the
file
system
and
the
default
one.
A
So
we
can
see
the
status
of
my
vehicle
here.
Just
confirm
everything
is
ok,
everything
is
ok.
We
can
see
that
the
container
registry
is
up
and
running.
So
the
first
thing
that
we
need
to
do
is
plug
in
the
default
user.
For
the
GDK
is
root.
You
can
use
either
a
password
or
not
says
token
F
an
access
token
here,
so
I'm
going
to
use
that
real
return.
And
now
the
first
thing
that
we
are
going
to
do
is
look
at
a
really
simple
docker
file
that
I
have
here.
A
So,
let's
see
so
this
is
a
file
that
in
units
from
Alpine
version,
3.2
11.6
and
the
only
thing
that
it
does
is
basically
a
Queen's
hello
world
string.
So
this
is
a
really
simple
test.
So
let's
build
an
image
based
on
this
and
let's
call
it
version
1.0.0,
okay,
I'm
going
to
use
the
test
represent
Ori
that
I
just
mention
it.
A
A
Storage,
okay,
so
inside
this
folder
you
have
all
the
data
structures
that
are
saved
by
the
container
is
so
everything
is
inside.
Here
we
can
see
its
size
right
now.
So
at
the
moment
it's
2007
megabytes.
So
that's
pretty
small.
We
can
also
see
that
I
have
the
first
system
of
the
registry
opening
here
on
IBS
codes.
We
can
see
everything
that
it's
inside
and
the
container
registry.
It
always
has
this
structure
so
folder
with
soccer
another
one
with
registry,
then
v2,
and
then
we
have
two
main
folders,
which
are
repositories
and
plots.
A
We
will
look
first
at
repositories.
Okay,
so,
as
you
saw
we
have
in
switchback
here
we
have
used
the
github
zorg
tests
repository,
so
we
have
a
folder
for
each
ones
at
work
here,
then,
we
have
a
folder
for
get
labs
test
here,
okay
and
then
inside
we
have
the
contents
of
the
repository.
Okay,
we
have
three
more
folders
here.
Layers
manifests
and
the
boots,
let's
ignore
uploads,
because
they
are
not
meaningful
for
now,
but
basically
this
is
a
local
cache
that
is
used
to
to
cache
multi-party
boots.
We
don't
need
this
for
this
video.
A
The
main
one
that
we
need
to
look
at
is
the
manifests
folder
and,
as
a
brief
explanation
in
docker,
we
have
repositories,
we
have
images
and
we
have
tanks
okay.
So
the
repository
is
the
plot
for
each
lock
test,
and
then
we
have
a
tag
now,
which
is
1.0.0
and
basically
the
the
repository
with
the
tag
corresponds
with
an
image
okay.
So
when
you
want
to
create
a
container
or
run
a
container
based
on
an
image,
you
always
need
the
repository
and
the
tech,
and
that
gives
you
an
image.
A
So,
on
the
doctor
fascists
on
docker
registry
file
system,
there
is
not
a
single
file
that
represents
the
image.
You
only
have
a
folder
for
your
brutal
story
and
inside
that
folder
you
have
one
or
many
texts.
Okay,
so
then
we
also
have
another
thing
which
is
called
a
manifest
and
the
manifest
is
basically
a
receipt
to
build
an
image
for
later
good
story
at
that
Tech.
A
If
you
look
here
on
top
of
the
text
folder,
we
have
type
1,
dot,
0,
dot,
0
and
with
we
see
current
link,
we
can
ignore
the
next
part
for
this
video.
But
if
you
look
at
the
current
manifest
that
these
tag
points
to,
we
will
see
the
digest.
Ok
and
basically
this
will
tell
us
ok
to
build
any
much
for
this
repository
and
this
tag
you
should
follow
the
receipt
that
is
written
in
the
manifest
that
has
this
digests,
ok
and
basically
inside
the
registry.
Everything
is
345
digest.
A
A
If
we
look
at
the
image
that
we
just
filled
with
the
software
history
Commons,
we
can
see
that
this
image
as
a
lawyer
with
data,
ok
and
then
we
have
also
2
entries
here
with
no
size.
This
one
comes
from
the
base
open
image.
Ok,
so
we
haven't
done
anything
about
that.
If
you
look
at
Tokra
and
you
look
at
this
image,
you
will
see
that
you
we
already
have
here
commented
on
the
image.
So
that's
not
ours.
You
know,
I,
think
that
we
head
into
the
image.
Is
this
instruction?
A
Okay,
so
we
are
not
actually
getting
any
more
data
to
the
to
the
damage.
We
are
just
overriding
the
comment
to
start
image.
So
if
we
look
now
and
manifests,
let's
grab
these
digest
and
go
to
the
blocks
folder,
and
then
we
are
going
to
find
the
digest
that
we
are
looking
for.
So,
if
660,
that's
here,
okay,
so
this
is
the
image
this.
It
is
the
manifest
for
the
image
right
type
1.0.0
inside
the
keyboard.
It
lab
tests
repository
as
this
manifest,
and
this
manifest
tells
docker
alt
to
build
an
image
format.
A
Okay
inside
here
we
have
two
main
components:
we
have
a
configuration
which
is
also
referred
through
a
digest
and
the
corporation.
If
we
look
for
it,
it's
also
studying
the
box
folder
and
it's
another
JSON
documents
that
you
can
look
at
me
just
say
this
adjacent
okay
and
the
configuration
is
the
document
that
will
tell
docker
all
to
build
a
container
based
on
this
image.
So
it
includes
stuff,
like
the
comments
it
will
tell
docker
about
about
the
platform
that
this
image
can
run
on.
A
It
will
tell
it
without
these
three
of
the
image,
so
basically
everything
every
single
thing
that
we
did
to
build.
The
image
is
here
and
the
operating
system
as
well.
So
this
is
only
interpreted
by
the
docker
engine.
We
don't
need
to
worry
about
it.
So
if
we
go
back
to
the
manifest
we
has
a
configuration
and
then
we
have
the
letters.
Okay
and
the
letters
are
basically
what
compose
an
image.
So
an
image
can
have
many
layers
for
each
modification
that
you
do.
You
create
a
new
layer.
A
In
this
case
we
didn't
do
any
kind
of
modifications
right.
The
only
value
that
the
image
will
have
is
the
foreground
layer.
Okay,
because
the
only
thing
that
we
did
was
over
comment
and
that
says
no
data
effects,
so
the
only
layer
here
comes
from
the
Alpine
image
and
we
can
also
find
it
inside
the
box
folder.
A
So
if
we
look
by
this
digest
inside
the
box
folder,
we
will
find
it
so
CB
here
it
is,
and
this
is
a
binary
file
because
it
is
compressed
ok,
but
this
is
basically
the
real
layer
or
the
image
is
stored
here.
Ok
now,
if
we
look,
let's
look
again
at
manifest,
we
have
the
size
of
of
a
layer
right
and
this
is
the
compressor
size
and
we
also
have
the
digests.
A
So
let's
look
at
the
islam
uy
french,
and
we
can
see
that
we
have
a
repository
here
and
if
you
go
inside,
we
have
one
tag.
That's
right,
it
has
a
new
HIV
and
we
can
see
the
compressing
size
here.
So
this
is
correct
and
this
image
ID
that
you
see
here
will
match
the
ID
of
the
configuration.
So
if
we
look
here,
it's
the
same
thing,
it's
the
first
portion
of
the
digest
of
the
image
configuration.
Ok.
A
So
now,
if
we
look
at
the
at
the
registry
size-
and
this
is
the
part
that
may
become
confusing-
we
have
two
thousand
seven
megabytes
now,
let's
say
I
want
to
push
another
image.
It's
also
based
on
the
same
soccer
file,
but
it
will
be
hosted
in
a
soup
repository.
Ok,
so
let's
do
this
and
let's
put
this
inside
a
super
Abaza
torii
this
time.
A
Okay,
good
love
allows
super
busy
Tori.
So
you
can
do
this
now
place
push
push
the
image.
It's
done
and
let's
go
back
and
check
the
registry
size
again.
Okay,
so
it's
the
same
thing
right.
We
have
pushed
one
image.
We
have
push.
It
pushes
the
second
image
right
now,
but
the
size
is
the
same,
so
some
will
expect
to
see
the
motor
size
because
we
have
to
push
it
to
images,
but
in
the
end
they
are
exactly
the
same
thing.
A
A
So
one
thing
to
keep
in
mind
is
that
the
registry
doesn't
store
any
duplicates.
So
if
an
image
references,
the
same
layer,
it
won't
store
the
layer
twice,
it
will
store
the
later
only
once
and
the
same
goes
for
the
manifests.
If
you
have
an
image
that
exactly
equal,
but
they
have
a
different
time
or
in
a
different
repository,
the
registry
won't
store
two
copies
of
the
same
manifests.
It
will
only
store
one
copy
and
that's
why
the
only
thing
that
we
have
inside
the
repositories
folder
are
links.
A
A
There
are
no
more
entries
because
we
pushed
another
image
to
a
different
repository
this
time.
So
it's
the
same
manifest
the
manifested
hasn't
changed.
It
has
exactly
the
same
configuration
because
we
didn't
change.
We
just
created
a
copy
of
it
in
a
different
repository
and
is
only
a
silver
layer
as
well.
Okay,
now,
if
you
go
back
to
the
to
the
UI
again,.
A
We
can
see
that
we
still
have
a
single
image
here
and
this
one
has
2.6
eight
megabytes
with
this
ID
and
then,
if
we
go
to
this
one,
that
is
also
1.0.0
image,
which
has
the
same
size
and
the
same
ID.
So
looking
at
the
UI,
you
may
think:
okay,
my
registry
right
now
as
this
size
multiplied
by
two.
But
it's
not
the
case
because
they
both
reference,
the
same
image
IV.
So
they
only
exist
once
okay.
A
A
The
result
will
be
exactly
the
same
Yahoo
to
be
exactly
the
same,
but
now
we
are
actually
creating
data
on
this
docker
file,
which
means
the
docker
diamond,
will
create
a
new
layer
which
will
contain
these
eleven
string
inside
alpha.
Okay.
So
let's
go
ahead
and
call
this
version
2.0
of
our
word
dummy
application.
A
Yeah
exactly
same
outputs.
Now,
let's
go
ahead
and
push
this
new
tag
to
our
repository.
Okay.
We
can.
We
already
saw
that
something
change
here.
Okay,
so
this
time
we
have
more
blobs
in
our
phone
system.
Let's
first
look
and
the
repository:
let's
ignore
this
one
and
this
one.
Let's
look
at
the
new
folder,
which
is
here
for
tech,
2.0,
dot,
zero
and,
let's
see
what
manifest
does
it
point
to
so
it's
not
the
same
manifest
then
Tech
1.0
right.
So
this
one
was
f66
and
now
it's
9f.
So
it's
a
different
manifest.
Why?
A
Because
we
have
changes
the
receive
of
the
image,
we
have
changed
the
image
we
have
added
new
data,
so
the
receipt
to
build
image.
It's
also
different
and
so
is
the
configuration
and
therefore
there
is
a
there-
is
a
new
wait
for
should
freeze.
So,
let's
first
look
at
the
manifest:
let's
go
to
the
boss,
folder,
let's
find
our
new
manifest
okay,
and
we
can
see
here
that
we
have
a
different
configuration
as
well,
so
we
did
more
stuff
on
this
aquifer
and
if
you're
going
to
look
after
the
configuration,
let's
change
this
Jason
format.
A
A
Let's
go
back
to
the
manifest,
and
now,
instead
of
a
single
layer,
you
probably
remember
on
type
1.0.0
we
only
add
one
layer
and
it
was
this
one
right
this
time
we
are
using
the
same
image,
but
we
are
extending
it
with
an
additional
data
right.
So,
on
top
of
the
existing
layer,
we
added
a
new
one,
and
this
new
one
is
basically
our
our
alpha
with
the
yellow
string.
That's
why
so
small
and
in
test
these
touches.
A
So
if
we
go
and
look
for
it,
there
is
a
folder
for
it,
and
it's
here
Coralie
it's
here.
This
means
that
whenever
you
pull
the
image
to
0.0,
what
dr.
will
do
is
first,
it
will
look
to
see.
If
repository
and
the
tag
exists
on
the
container
registry,
then
it
will
crack
the
manifest
for
that
image.
We
already
saw
that
is
this
one,
then,
with
the
manifest
enhance
it
will
pull
the
configuration,
ok
and
it
will
pull
all
the
layers
that
it
needs
to
build
an
image
following
this
receipt.
A
Okay,
so
the
most
important
part
here
is
not
looking
at
an
image
as
a
single
file
in
the
container
registry,
because
that
doesn't
exist
in
the
container
registry.
We
only
have
the
layers
that
compose
an
image
and
we
have
the
receipts
to
assemble
those
layers
in
order
to
build
the
image.
Ok,
so
that's
the
the
most
important
concept
that
we
should
keep
in
mind.
So,
let's
look
again
at
the
repository
and
now
we
have
typed
1.0.0
tag
2.00,
they
have
the
same
size.
A
We
only
added
a
string
to
a
small
file,
so
that's
not
an
issue,
but
now
they
have
different
images.
Alright.
So
looking
at
this
we
could
say:
okay,
the
size
of
this
repository
is
this
with
this
right,
because
we
have
two
tags
and
they
have
different
image,
IDs
so
for
sure
the
size
of
my
repository,
it
should
be
around
five
megabytes.
So,
let's
see,
if
that's
true
so
remember,
we
have
2.7.
A
Now,
if
you
look
at
it
again,
we
only
until
update
so
we
don't
have
twice
the
size
we
have
to
rotate,
which
is
exactly
what
we
had
before,
plus
the
layer,
the
only
layer
that
we
actually
created
and
the
registry
didn't
have
before
okay.
So
this
is
why
it
is
difficult
to
estimate
the
size
of
repository,
because
you,
the
reason,
may
be
reusing
some
layers
that
are
either
belonging
to
the
same
of
the
story
or
belong
to
different
repository.
A
So
let's
say
that
after
this
we
would
create
a
new
project,
get
lab
tests
and
we
would
repeat
exactly
the
same
steps
that
we
need
here.
It
wasn't
to
placate
the
layers
right,
because
the
way
was
already
exists.
It
will
only
create
links
for
those
layers,
so
in
the
end
the
reservoir
would
have
exactly
the
same
size.
But
now
we
have
more
visitors,
okay,
so
this
is
the
part
that
can
be
confusing.
A
A
A
Yeah
and
those
blocks
are
shared
not
only
within
the
central
repository
can
they
can
be
shared
across
through
the
stories.
So,
let's
say,
for
example,
imagine
that
in
in
Keylong
everyone
would
use
the
Alpine
as
the
base
image
and
we
have
100
repositories.
We
wouldn't
have
100
copies
of
the
layers
of
the
Alpine
image.
We
only
have
one
copy,
and
every
single
repository
will
reference
that
layer.
Okay,.
A
B
A
A
Yeah,
it
depends
on
the
version
you
were.
You
were
using
at
a
specific
question
here.
It
depends
the
size
right
between
between
between
versions.
Another
thing
to
keep
in
mind
is
that
here
we
are
talking
about
the
compressing
size,
so
the
registry
only
store
is
the
compressive
version
of
the
layers
and
the
size
that
the
registry
tells
you
about
is
the
compressive
version.
But
when
you
pull
an
image
from
the
registry
with
soccer,
it
will
decompress
those
layers.
Okay.
A
So
if
you
look
at
the
size
on
your
machine
and
the
size
on
the
registry,
they
won't
match
right,
because
the
ratcheting
saves
the
compressive
version
and
in
your
local
machine
you
may
have
a
compressive
version,
so
the
size
may
not
match.
So
one
of
the
things
that
we
also
discuss.
It
was
out
to
an
estimate
the
size
of
okay.
So
we
can
we
can.
We
can
do
that.
You
can
do
that
through
the
UI,
but
that
doesn't
account
for
duplicated
box
right.
A
A
We
would
sum
them
and
that
will
give
us
the
size
of
the
word
story.
Okay,
the
only
thing
to
keep
in
mind
is
that
the
size
that
it
takes
directed-
theoretically-
it's
probably
not
the
site
that
it
will
take
on
the
file
system,
because
you
may
have
other
repositories.
I
shared
the
same
layers.
So,
as
we
saw
here
also
our
alpha,
our
guitar
test
at
2007
to
seven
megabytes,
and
then
we
copied
to
the
food
repository
and
it
also
a
2.7
megabytes.
That
doesn't
mean
that
both
of
them
are
thinking
2.7,
megabytes
right.
A
They
could
do
something
like
that
to
identify
the
repositories
that
old
most
of
the
big
images
and
then
see
if
they
can
save
space
by
looking
at
the
layer
size.
But
one
thing
that
we
also
need
to
stress
out
is
that,
once
the
registry
does,
for
example,
when
doing
garbage
collection,
it
will
basically
walk
through
each
one
of
these
folders
and
will
look
at
each
one
of
the
blocks
and
see.
Is
there
some
repository
that
references
this
one?
A
A
So,
for
example,
we
have
created
this
tag
right
and
here
we
have
added
a
new
layer,
so
let's
see
again
version
9.
This
was
the
layer
that
we
had
it
right.
This
is
unique
to
the
to
this
tag
inside
this
repository.
So
if
we
delete,
if
we
delete
this
thing,
that's
a
of
course
you
wouldn't:
let's
actually
do
it
through
the.
A
A
This
means
that,
right
now,
whenever
we
run
running
garbage
collection,
the
registry
will
find
out
that
there
are
no
other
repositories
referencing
this
layer,
so
it
can
be
safely
ability,
because
the
only
one
that
was
referencing,
that
was
the
tag
20.0.
We
do
we
delete,
which
means
that
no
one
else
is
using
it.
So
it's
it's
it's
safe
to
remove
it.
Okay,.
B
A
A
Eats
a
lot
so
yeah,
so
that's
really
beginner
to
face
scan
first,
it
will
scan
every
single
repository
if
you'll
save
the
reference
or
the
digest
of
every
single
layer
that
is
referencing
across
all
repositories,
and
then
it
will
do
a
second
pass
over
the
blocks
folder
and
will
delete
everything.
That
is
not
on
that
on
that
list
of
digests
to
keep
okay.