Refactor DNS update commands to be run outside of containers