How to write a dockerfile in CentOS7 from scratch

I need to build an image on an application for CentOS7 . Following the docker documentation I have performed following steps:

  1. Installed docker on my centos7 machine
  2. Created new folder

Now I want to start writing the docker file for application xyz. My questions are :

  1. Do I need to create a new file name xyz.dockerfile ( touch xyz.dockerfile and them vim ) and then start writing a command ? or simple create a new dockerfile ( touch dockerfile)

  2. How can I display comments while for multiple operations while executing this dockerfile ?

  3. What will be CMD parameters if first task I need to perform is download yum repository ( rpm -ivh abc.rpm) in my dockerfile?

Any help will be appreciated. Thank you.

Source: StackOverflow