Instruction that is used to build an image. Use the docker image build command to create a new image using the instructions contained in the Dockerfile. This example creates a new Docker image called name:tag. Be sure to perform this command from within the directory containing the app code and Dockerfile.
docker build -t <image_name>:<tag> <source_of_Dockerfile>
$ docker build -t node-app:latest .
$ docker image ls
docker run -d --name <container_name> -p <host_port>:<container_port> <image_name>:<tag>
$ docker container run -d --name=web1 -p=9000:8080 node-app:latest
$ curl http://localhost:9000
Open a web browser and navigate to the DNS name or IP address of the host that you are running the container from and point it to port 9000. You will see the following web page.