Refactor Dockerfiles