Fixed how global dependencies are added to Dockerfile - modularized code