I like 1 qt to 1/2 gal containers with holes in bottom and sides for Monarchs -- Giant Swallowtails may do better with 1/2gal to 1 gal. It needs to be tall and wide enough for the butterfly to freely spread its wings without touching anything when it emerges/ecloses from the chrysalis.
You can actually keep the caterpillar in a smaller container and move the chrysalis to an eclosing container later if you prefer. I keep smaller caterpillars in clamshell plastic containers that cookies are sold in (holes in both top and bottom -- good ventilation is a must!). They are easy to maintain because you can lay fresh paper towels, caterpillars and food in the lid, remove spent food and soiled paper towel, and basically flip the container.
For keeping until eclosing, I use 1 qt deli containers and 1/2 gal-1gal clear pretzel tubs. Lots of holes bottom side and lid or use a piece of gauze or tulle secured with elastic band for cover. Line the bottom with double layer of paper towel and add/replace food with at least as much as it can eat daily -- note that it will eat a lot during the night so make sure not to let it run out.
If you can't tend to feeding it twice a day or have trouble keeping the leaves fresh, get sprigs/branches and put them in small container of water (drink cups with stems stuck through straw hole will work, or narrow necked bottle crammed so no space for caterpillar to fall into the water or poop to fall in and soil the water.
You'll need to replace soiled paper towel.
Be sure to wash the food plant before feeding because predators lay eggs on the foliage for the caterpillar to ingest. I don't completely dry the leaves -- seems to keep them fresh longer.
If you don't want to give it your grapefruit leaves, try the other food plants listed in the link until you find what it will readily eat.
It looks like a later instar -- at 4th and 5th instar cats are voracious and will keep you busy until they go to sleep in their chrysalis.