There's no way the Marines are going to side with Doflamingo, even against Luffy and co.
They're headed by an Admiral who literally said he was going to kill Doflamingo after the current ruckus died down.
Doflamingo has cut off all communications the Marines had with the outside world.
Doflamingo is making Marines attack each other.
The Admiral in charge has a very strong sense of personal justice, so it's likely he'd side with pirates who are trying to overthrow a tyrant, even if only temporarily.