private void copyFromTemporaryContainers(DockerAccess dockerAccess, RunService runService,
            RegistryService registryService, ArchiveService archiveService, QueryService queryService,
            GavLabel gavLabel) throws IOException, MojoExecutionException {
        List<ImageConfiguration> imageConfigurations = getResolvedImages();
        for (ImageConfiguration imageConfiguration : imageConfigurations) {
            CopyConfiguration copyConfiguration = imageConfiguration.getCopyConfiguration();
            String imageName = imageConfiguration.getName();
            if (isEmpty(copyConfiguration)) {
                log.debug("Copy configuration is not defined for %s image, skipping coping", imageName);
                continue;
            }
            try (ContainerRemover containerRemover = new ContainerRemover(log, runService, removeVolumes)) {
                String containerId = createContainer(runService, registryService, imageConfiguration, gavLabel);
                containerRemover.setContainerId(containerId);
                log.debug("Created %s container from %s image", containerId, imageName);
                copy(dockerAccess, archiveService, containerId, imageName, copyConfiguration);
            }
        }
    }
Whether to copy from all containers matching configured images or only from the newest ones.
src/main/java/io/fabric8/maven/docker/CopyMojo.java