  We show that the double copy of gauge theory amplitudes to $\mathcal{N}=0$
supergravity amplitudes extends from tree level to loop level. We first explain
that color-kinematic duality is a condition for the Becchi-Rouet-Stora-Tyutin
operator and the action of a field theory with cubic interaction terms to
double copy to a consistent gauge theory. We then apply this argument to
Yang-Mills theory, where color-kinematic duality is known to be satisfied
onshell at tree level. Finally, we show that the latter restriction can only
lead to terms that can be absorbed in a sequence of field redefinitions,
rendering the double copied action equivalent to $\mathcal{N}=0$ supergravity.
