Every Dockerfile must have a FROM instruction, and it must be the first instruction in the file. (Actually, the ARG instruction can be used before a FROM instruction, but it is not a required instruction. We will talk more about that in the ARG instruction section.)
The FROM instruction sets the base for the image being created and instructs the Docker daemon that the base of the new image should be the existing Docker image specified as the parameter. The specified image can be described using the same syntax we saw in the Docker container run command from Chapter 2, Learning Docker Commands. Here, it's a FROM instruction that specifies using the official nginx image with a version of 1.15.2:
# Dockerfile
FROM nginx:1.15.2
Note that in this example, there is no repository specified that indicates that the specified image is the official nginx image....