You can follow the below-mentioned steps to learn how to build images:-
Create a folder for the project
Create a file called ‘Dockerfile’
Fill the ‘Dockerfile’ with commands to build your image
use ‘docker build -t app: latest .” to build the image
the image ‘app: latest’ will then be available to run
use ‘docker run app: latest’ to run the image
use ‘docker run -it app: latest’ if you need an ‘interactive ‘terminal
Should be good to go.
Here is a Docker Training Course which you must take up learning Docker and have a valued certificate. For your reference, I am also mentioning a video tutorial to learn all the basics of Docker. .