This is basic docker file example for understanding of its uses. You can simply clone this repository and build an image.
git clone https://github.com/tecrahul/dockerfile
cd dockerfile
Now build the docker image named apacheimage.
docker build -t apacheimage .
For more details visit: https://tecadmin.net/tutorial/docker/docker-dockerfile/