Split database-requiring build commands into their own RUN command. Add and clarify comments.