consolidate related commands to one to have less build stages and fix typo in RUN command