Minimizers and gradient flows for singularly perturbed bi-stable potentials with a Dirichlet condition