After building a Docker image from a dockerfile, I see the image was built successfully, but what do I do with it? Shouldn\'t i be able to run it as a container
Since you have created an image from the Dockerfile, the image currently is not in active state. In order to work you need to run this image inside a container.
The $ docker images command describes how many images are currently available in the local repository.
and
docker ps -a
shows how many containers are currently available, i.e. the list of active and exited containers.
There are two ways to run the image in the container:
$ docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]
In detached mode:
-d=false: Detached mode: Run container in the background, print new container id
In interactive mode:
-i :Keep STDIN open even if not attached
Here is the Docker run command
$ docker run image_name:tag_name
For more clarification on Docker run, you can visit Docker run reference.
It's the best material to understand Docker.