I don't think so. Squash plants spread out several feet, so you'll need to provide room for that. Is there a reason you can't plant your squash directly in the ground?
The root system for a squash plant has to be fairly large in order to provide water and nutrition to all that top growth. According to this [url=https://ohioline.osu.edu/hyg-fact/1000/1647.html]fact sheet from Ohio State University[/url], the container must be at least 24" deep. That will be deeper and also wider than a 5-gallon bucket.
"Isn't it enough to see that a garden is beautiful without having to believe that there are fairies at the bottom of it too?" - Douglas Adams