neither.
Never just walk into court and put in a guilty plea (even a no contest).
For something that small but has potential for a large fine and community service time, go in and put in a not guilty plea then request a court appointed attorney. He will give a later trial date and the name of an attorney. If you want you can talk to the attorney or you can just go directly to the DA and work out a plea bargain. It's nothing complicated you just explain to him your case and he'll usually either ask the judge himself to throw it out or he'll offer you a super light sentence such as a small fine in exchange for a guilty or no contest plea. Usually you should take whatever he offers but then after accepting it in the next court date plea your case to the judge. He'll typically lower it even more or in your case if you're insistent that it wasn't your container and it wasn't within arms length (or whatever the local laws in your area that constitute open container) of you he'll probably drop it before he actually lets it go to a trial where he has to find a jury and get the cop to come in.