How to Set boundaries to a image that pan and zoom

Hello, I’ve got an image within a container about half the size of my stage and am trying to keep that image confined to that container with the ability to pan and zoom. I want to be able to set boundaries so the image doesn’t move outside of the container when panned.

Put that image within a pinboard and see if that works