Fixed broken refactoring: use new cp method of docker container.