private void copyFromStartedContainers(DockerAccess dockerAccess, RunService runService,
            ArchiveService archiveService, GavLabel gavLabel) throws IOException, MojoExecutionException {
        List<ContainerDescriptor> containerDescriptors = runService.getContainers(gavLabel);
        for (ContainerDescriptor containerDescriptor : containerDescriptors) {
            ImageConfiguration imageConfiguration = containerDescriptor.getImageConfig();
            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;
            }
            String containerId = containerDescriptor.getContainerId();
            log.debug("Found %s container of %s image started by start mojo", 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