Heat the oil in a large pot. Add the onions and garlic, stirring several times, then put the whole chicken into the pot. Cook for 15 minutes while turning the chicken to prevent it from burning.
Add the lemon juice, cloves, cinnamon, grated coconut, salt, and pepper. Stir well and let the chicken cook for 10 more minutes.
Then add the tomatoes, marinated red onions, and pineapple. Let this cook over medium heat for 25 minutes.
Add the coconut milk, stir well, and turn off the heat.
Serve with white rice.