It is common for cruisers in remote areas to dump all food scraps over the side. The ocean quickly consumes food scraps. Fish are from the ocean so returning the scraps is a natural thing.
Garbage treatment changes with location. At a full service marina, all garbage can go up to the dumpster. The further you get from a full service marina, the more you have to change your plans. If you are remote enough, you can burn your paper and lightweight plastics.
That leaves cans, bottles, and plastic containers. Some people only keep the plastic containers, and let the ocean consume the rest.
If your conscience won't permit that, then wash out and store the metal, glass, and plastic containers until you get back to civilization.
In the Puget Sound area, there are plenty of dumpsters, in the outback areas of the Broughtons, there are none.