Here's the recipe I use (more or less) for my Sofrito. I tend to be pretty loose and creative with measuring and ingredients.
1 large onion
1 green pepper
3 or 4 sweet chili peppers
(ajíes dulces) -- I can't get these locally, and omit them
1 small bunch fresh cilantro
(which is actually fresh coriander leaves) (~ 1/2 cup loosely packed) -- authentic Puerto Rican Sofrito has an unrelated spice called Culantro (sometimes called recao) but cilantro makes a reasonable substitute. If you can get recao/culantro, use 3 large leaves.
2 cloves garlic
1/4 teaspoon dried oregano
chop onions and bell pepper into chunks and process all ingredients in a blender or food processor until they come "Green glop"
-- if you double the recipe and use 1 green bell pepper and 1 yellow one and no sweet red chili peppers it's a gorgeous green color. If you use any sweet red peppers it will be a muddy green-brown. I do it to be pretty green, LOL!
Pour the green glop into an ice cube tray and seal in a freezer zipper bag, and freeze until frozen. After they are frozen you can turn them out of the tray, if you desire, and store them in the freezer in the zipper bag.
Pull one or two out to toss into soups and such.
The recipe can easily be doubled, and it's worth your while to make a big batch and have it on hand.
You might want to have dedicated ice cube trays for the sofrito, though, so as not to taint your ice you make.