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
You can see your available images using:
docker images
Then you can run in detached mode so your terminal is still usable. You have several options to run it using a repository name (with or without a tag) or image ID:
docker run -d repository
docker run -d repository:tag
docker run -d image_id
Then you can check your container is running using
docker ps
docker ps gives you a container ID. You can use it or just the 2/3 first characters to go into your container using:
docker exec -it container_id /bin/bash
And you can stop it using docker stop container_id and docker rm container_id.
You can also run your container with -rm arguments so if you stop your container it will automatically be removed.