If using fresh onions, have a bowl of ice water at the ready. Bring a medium saucepan of water to a boil over high heat. Add the onions and blanch until tender, 3 to 4 minutes. Transfer them to the ice bath and let cool. To peel, snip off the tip with kitchen scissors and remove the papery outer layers. Set the onions aside. (If using thawed frozen onions, skip this step.)
Pack the onions into a clean 1-quart glass jar. In a 3-quart saucepan over high heat, bring 1/2 cup water and the vinegar, garlic, allspice, sugar, bay leaf, ginger, cloves, chile, and a pinch of salt to a boil. Lower the heat to maintain a simmer and simmer for 5 minutes to let the flavors blend.
Carefully ladle the vinegar mixture over the onions in the jar. Let cool to room temperature, then cover with the lid. Refrigerate for at least 5 days to let the flavors develop.
The onions will keep for up to 2 months in the refrigerator.