Had to revert image building to subprocess.popen