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 static-web: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=8080:80 static-web:latest
$ curl http://localhost:8080
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 8080. You will see the following web page.