Use build flags for daemon CLI code

Fixes #6256

Docker-DCO-1.1-Signed-off-by: Michael Maltese <mjm72010@mymail.pomona.edu> (github: michaelmaltese)