All Docker images start from a base image. A base image is the same images from the Docker Registry which are used to start containers. Along with the image name, we can also include the image tag to indicate which particular version we want, by default, this is latest.
These base images are used as the foundation for your additional changes to run your application. For example, in this scenario, we require ubuntu to be configured and running on the system before we can deploy our flask server. As such we want to use
ubuntu as our base image.
Dockerfile's are simple text files with a command on each line. To define a base image we use the instruction FROM
Task: Building a Dockerfile
To complete this step you need to execute the following code:
It's tempting to use the tag :latest however this can result in you building your image against a version which you were not expecting. We recommend that you always use a particular version number as your tag and manage the updating yourself.