1.create/edit the Dockerfile. Run “vi Dockerfile”, press “i” to switch to “Insert Mode”, write file content, press “Esc” to exit “Insert Mode”, and save+exit by typing “:wq”
2.Build the image using the command docker build . Path refers to the directory containing the Dockerfile.
3.At the end of the process you should see the message “Successfully built .
4.docker images-This command lists all the locally stored docker images.