I heard something about blue stickys but up high for some reason.
The yellow sticky traps seem to work, especially when laying horizontal on the top of the container. You can buy a can of sticky coating to reuse those yellow cards. (google for "tangletrap sticky coating".). Just squeegee off the old sticky with a razor blade, spread on the new.
What's worked for me is to lay posterboard over the top of the container. I bought some white poster board and cut two disks about 1-2" larger than the diameter of the container. I cut a slot to the center. Then place the two disks over the soil oriented so the slots in the center are on opposite sides. The white poster board reflects some light up (added benefit?). Another benefit is it keeps the top of the soil from drying out too quickly. Soil dries more evenly.
I think it helps a lot. If I have gnats, they're not many. Sometimes I'll spray a small amount of pyrethum under the cover. I'll lay a sticky on top.
The only remaining challenge is the drain holes at the bottom. I spray some pyrethum down there occasionally. I want to buy some panty hose, fit the bottom of the container into the hose so it will drain but block access to the gnats.