Are you saying that your run to the dryer outlet is 3-wire? Then it is likely (H-H-N), and you do not have a true ground. You are better off running 4-wire (H-H-N-G). Yes, people do use a spa panel to "derive" a fourth wire for a ground, but that approach has been argued to death. There's a summary in this thread
https://www.homebrewtalk.com/f170/3-wire-240v-spa-panel-4-wire-out-again-372667/, but I will paste it here.
-------------------------------------------------------
Duck and cover, lol. First, these are my impressions given prior discussions and what I have been able to find. Second, I am not an electrician, but I am a reasonable logician. Third, my intent is to dispassionately look at the issues, not to attack anyone, and not to impugn anyone's character.
If you can run a dedicated ground from the main panel to the spa panel, or rewire with 4 wires from the main panel, then do it. That is a clean solution.
Now, if you are going to wire the spa panel with H-H-N in, bond the N and G to the spa panel chassis, run H-H-N-G out to the control panel, and wire both 120V and 240V in your control panel:
Will it work? Yes.
Does it conform to code? If you were to hardwire it as part of your house wiring, it does not conform to code, as the spa panel is not a grandfathered device that allows bonding N and G (more precisely, allows connecting the frame of the device to neutral, and using the neutral as the grounding conductor for that device). If you were to make the spa panel a "pluggable" device, you have not changed your house wiring, so you have not violated code with your house wiring. However, you have built a device (the spa panel) that does not qualify as grandfathered, and certainly violates the spirit of the code if not the letter.
Is it dangerous? Risk is relative. In a worst case scenario, say your control panel neutral comes loose and gets good contact with your control panel ground, and the GFCI in the spa panel fails, your spa panel chassis could be conducting 120V. If you were touching it and you were the shortest path to ground, then you would carry the current. This may be unlikely, but it is basically a variation of the scenario that led the NEC to change the code and require a dedicated ground wire. Incidentally, if you have a 3-wire dryer or range, the same scenario is possible if the neutral is compromised and you become the ground path. One could argue that these pose even more risk, because there is no GFCI protection to detect that the neutral is compromised and kill the power.
Understand the risks, and make your own decision. I would say you should really try to go with a dedicated ground. If you choose to use the 3-in, 4-out, spa panel solution, recognize that you are taking some risks that you can mitigate some by always testing that your GFCI is functioning, by putting the spa panel somewhere where neither you nor anyone else is likely to touch it while energized, and by neither selling, lending, nor giving the system to anyone else who does not understand the risks.
I sincerely hope that I succeeded in my attempt to discuss this issue in a balanced manner.