Building Docker images
In this section, we will cover the docker image build
command. This is where the rubber meets the road, as they say. It’s time for us to build the base upon which we will start building our future images. We will be looking at different ways to accomplish this goal. Consider this as a template that you may have created earlier with virtual machines. This will help save you time as this will complete the hard work for you; you will just have to create the application that needs to be added to the new images.
There are a lot of switches that you can use while using the docker build
command. So, let’s use the one that is always handy. Here, we will use the --help
switch on the docker image build
command to view what we can do:
$ docker image build --help
There are a lot of different flags listed that you can pass when building your image. Now, it may seem like a lot to digest, but out of all these options, we only need to use --tag
, or its...