build docker using dockerfile code example
Example 1: docker build from dockerfile
$ docker build - < Dockerfile
Example 2: command to build docker file
// Make sure you are in the same dictionary where you have saved your Dockerfile
command is:
docker build .