I know that polio vaccine consists of small dose of polio virus itself, which activates body's immunity against the disease. An infant is given a no of vaccines including chickenpox, tetanus, diptheria etc, see here for details. Does all these vaccine work on same principle ie they contain small dose of respective virus/bacteria to activate hosts immunity?
There are a wide variety of different kinds of vaccines. The basic principle is that the human (and more generally, jawed vertebrate) immune system can identify invaders by recognizing and responding to portions of macromolecules on those invaders called antigens. Vaccines use this principle by exposing the immune system to specific antigens ahead of time, so the immune system is prepared for them. There are, of course, many more details about why that is helpful, but I think they're beyond the scope of this question.
polio vaccine consists of small dose of polio virus itself
Vaccines generally don't involve a small amount of the pathogen itself. Current poliovirus vaccines include an inactivated virus (killed with formaldehyde) that cannot reproduce, and several live attenuated viruses, that is different strains of viruses that can replicate, but do not cause disease. The inactivated virus is used in the united states, but the attenuated virus is used in some other countries.
There are several types of vaccines, and none of them involve small doses of the pathogen itself. The key here is exposing the immune system to the antigen, not the pathogen. As with polio, the major groups are live attenuated or inactivated vaccines. There are many kinds of inactivated vaccines. They can be whole killed viruses or bacteria, or just the important parts. Some vaccines are a just subset of key proteins or polysaccharides.
You can read about all these details in the CDC pink book. Chapter 1 discusses the principles and the different types of vaccines. Chapter 18 discusses polio virus.