Not ok
Some dog foods contain garlic in very small amounts, and some homecooked recipes call for it, but it is a toxic food to dogs.
I was feeding The Honest Kitchen for a while and it did contain garlic on down the list, and I was fine with it, but I would never add fresh garlic to their food to entice them to eat (as some suggest). There are much better things to add to the food that are actually good for them and will get them to eat.