class ImageDownloadManager {

    public static void createImageSnapshot(Orchestrator orchestrator, String microserviceUuid) {
    	LoggingService.logDebug(MODULE_NAME, String.format("\"Start Create image snapshot \"%s :" , microserviceUuid));
        Optional<Container> containerOptional = DockerUtil.getInstance().getContainer(microserviceUuid);
        String image;
        if (containerOptional != null && containerOptional.isPresent()) {
            Container container = containerOptional.get();
            image = container.getImage();
        } else {
            logWarning(MODULE_NAME, "Image snapshot: container not running.");
            return;
        }

        String imageZip = microserviceUuid + ".tar.gz";
        String imagePath = "/tmp/" + imageZip;
        CommandShellExecutor.executeCommand("docker save " + image + " | gzip -c > " + imagePath);

        CommandShellResultSet<List<String>, List<String>> resultSetWithPath =
                CommandShellExecutor.executeCommand("readlink -f " + imagePath);
        if (resultSetWithPath.getError().size() > 0) {
            LoggingService.logWarning(MODULE_NAME, resultSetWithPath.toString());
        } else {
            if(!resultSetWithPath.getValue().isEmpty()){
                String path = resultSetWithPath.getValue().get(0);
                try {
                    //TODO: think about send few files
                    File imageFile = getFileByImagePath(path);
                    orchestrator.sendFileToController("image-snapshot", imageFile);
                    imageFile.delete();
                    logInfo(MODULE_NAME, "Image snapshot " + imageFile.getName() + " deleted");
                } catch (Exception e) {
                    logError(MODULE_NAME, "Unable send image snapshot path",
                            new AgentSystemException(e.getMessage(), e));
                }
            }
        }
        LoggingService.logDebug(MODULE_NAME, "Finished Create image snapshot");
    }

}