[Intro Music]
We have just successfully pulled
two different images from Docker
Hub. And those images are
hello-world and busybox. And
basically now we are ready to
create new containers from those
images. But before doing that, let
me explain you the structure of
every image, and explain you
actually key points about images.
In a nutshell, every image is
simply a set of files, that's that
simple. And when you pull image
from Remote Registry like Docker
Hub, you download simply a set of
files and folders, that's that simple.
But every image is actually
splitted into different file system
layers, or shortly 'fs' layers. And
you may ask me, what is the reason
for splitting the images into
multiple 'fs' layers? Answer is very
simple, using such splitting
approach, we are able to reuse
different 'fs' layers in
different images. For example,
let's say that there is an image
that has PHP installed in it. And
now you want to create image that
will be running WordPress. You
probably know that WordPress uses
PHP. And if you create wordpress
image, you could reuse 'fs' layers in
the 'php' image, and add additional
layers that will install WordPress
and run it afterwards. That's
reusability of different 'fs'
layers. Also, every image has so
called Base Image. For example,
Base Image could be busybox, or
alpine, or ubuntu, or something
else. And on top of that Base Image
you are able to add
additional layers like in this
example, Layer 1, then on top of
Layer 1 you add additional Layer
2 image, and next you add
additional Layer 3 image. And
different images may have different
quantity of the 'fs' layers. Some
simple images may have just one or
two 'fs' layers, more complicated
images may have 10s of different
layers. Alright, let me now talk
about key points about Docker
Image. First of all Docker Image is
read-only. You are not able to
modify existing Docker Image. It is
not possible at all. But you are
able to create custom image based
on other image if you want. And if
we'll get back to images that we
have already pulled from Docker Hub
hello-world and busybox, you are
not able to modify those images.
You are able just to create
containers based on those images,
or create other images based on
those images. Next, as I have
already told you every image
consists of multiple file system
layers. And there could be 1, 2, 3, 10s,
100s of different 'fs' layers,
as much as you want. Next, images
could be stored in a private or
public repositories. And we have
actually used the public
repositories for hello-world and
busybox images. And those
repositories are available at
Docker Hub Public Registry. But
you're also able to create private
repositories if you create some
proprietary images, and that your
company only uses. Next, images could
be copied, deleted or moved. And
actually in the previous lecture,
we have simply copied images from a
remote server to our local
computer. And in the same way,
you're able to copy images from
your computer and move it to other
computer if you want to. Because
every image again is simply a set
of files. But during download
process, you may have noticed that
we were pulling different 'fs' layers.
And actually when you pull image
from a remote repository, from
Remote Registry, then you are
pulling archived 'fs' layers. And if
for example, image has three
different 'fs' layers, then you'll
download three different archives.
It is done for optimization of
bandwidth usage. And afterwards on
your local computer Docker will
extract contents from those
archives. Alright, next, you're
able to use official or community
images. And in the previous lecture
hello-world and busybox images were
official images. And if I go back
to Docker Hub, here you will see
that hello-world is Docker Official
Image. But if I'll type for
example, let's say,
'php', you'll see that there is also
php Official Image available; but
if I scroll a bit down, you'll see
such images as 'phpmyadmin/
phpmyadmin', 'phpdockerio/
php73-fpm'; and those images are
community images. They were created
by specific users. This image
was created by 'phpmyadmin' user,
this by 'phpdockerio' user, and so
on. Again, there are official
images and community images. You're of
course able to use either
official images or community images
as long as they are publicly
available. Alright, that's what I
wanted to tell you about Docker
Images. And the key point here is
that every image is read-only, you
are not able to modify the image.
And the second key point is that
every image consists of multiple
file system layers. And every file
system layer is simply a set of
files and folders. Alright, that's
all for image structure overview.
And next, let's proceed and let's
try to create first container based
on hello-world image. I'll see you
in the next lecture guys. Bye-Bye.
[no audio]