Restructuring Dockerfile to debug failure