Throughout this course we've been making use of images that have been created by other engineers.
So for example we have used say the hello world image or reduced or busy box.
These are all images that were created by other engineers.
We download them onto our local machine and then created a container out of them.
At this point we're going to start to figure out how we can build our own custom images so that we can
run our own applications inside of our own personalized containers.
The process for making an image is somewhat straightforward like all things you just have to learn a
little bit of syntax.
So here's what we're going to do to make our own image.
We're going to create something called a docker file a darker file is essentially a plain text file
that is going to have a couple of lines of configuration placed inside of it.
This configuration is going to define how our container behaves or more specifically what different
programs it's going to contain and what it does when it starts up as a container.
Once we create that Docker file will then pass it off to the docker client which you'll recall is the
docker supply that we've been using at our terminal in turn.
The Docker client will provide the file to the docker server.
The Docker server is what is doing the heavy lifting for us.
It's good to take the docker file look at all the lines of configuration that we have inside of it and
then build a usable image that can then be used to start up a new container.
Now that Docker file is where all the complexity is going to sit and like I just said a moment ago it's
not really going to be the worst thing in the world.
It's just about learning a couple of new commands that's all in fact just about every Docker file that
you and I are going to put together is almost always going to look the same inside of every Docker file.
We're always going to specify a base image.
We'll talk about what that means in just a moment.
It's got it.
It's going to be one of the first things we have to do.
After that we'll add in some additional configuration to run commands to add in some dependencies or
some more software some more programs that we need to successfully create and execute our container.
And then finally we will specify a start up command for the image.
So anytime we take that image and create a container out of it it will be the command that is executed
to essentially boot up or start the container is the same command that we've been talking about around
all of these images all along.
OK.
So that's it.
That's all we have to do to make our own image essentially just revolves around writing a docker file.
So let's take a quick pause right here.
We'll come back the next section and get started working on our Docker file.