You can get different strawberry planters, normally elevated, that can work. The problem I have with any container is getting the water right. It’s real easy to get them too wet yet they can dry out really fast. I’ve never tried strawberries in containers but the water problem is for any container. It can be a pretty fine balancing act. Some people get it right. I have challenges.
I don’t know where you are located or why your in-ground crop failed. Here mine can freeze out in the winter, the plant gets pushed up in the frost so it is out of the ground if it is not mulched right, and in the summer they can cook or dry out. Weeds, especially grass, is also a problem. Still, my strawberry jam from last year was delicious.