We have an espresso machine and a nice coffee grinder for single dosing. So I required small containers to pre-weight coffee beans for single dosing. They fit a bit more than 18g and probably are not airtight! But they do what I need them for. You are welcome to adopt or do whatever. It can also be used for something else.
I tried adding a rubber band, helps a bit, but still not watertight.