Dictionary definition:
Un tire-au-flanc n.m. (masculine)
Personne qui cherche à échapper à ses obligations, à son travail, à une corvée |
Literally, a person who avoids their obligations, their work, or a chore.
It can also be used to indicate someone who is lazy or is a slacker;
Celui-là a un côté tire-au-flanc
That guy is a bit of a slacker
It comes from 19th century Military slang to depict a soldier who would go to extremes to escape his obligations.
A soldier who, during a battle, would rather be found on the ‘calmer’ flank, than in the vanguard, ready to undertake heroic feats.
Tirer au flanc 
the verb tirer in this context does not refer to the English translation ‘to shoot’.
The French reflexive verb ‘ se tirer ‘ would be more appropriate and is often used to signify “ to get away “ or “to get out” (of danger)
Resources
Larousse.fr https://www.larousse.fr/dictionnaires/francais/tire-au-flanc/78156