public void pushImages(ProjectPaths projectPaths, Collection<ImageConfiguration> imageConfigs,
                           int retries, RegistryConfig registryConfig, boolean skipTag, BuildService.BuildContext buildContext) throws DockerAccessException, MojoExecutionException {
        for (ImageConfiguration imageConfig : imageConfigs) {
            BuildImageConfiguration buildConfig = imageConfig.getBuildConfiguration();
            if (buildConfig == null || buildConfig.skipPush()) {
                log.info("%s : Skipped pushing", imageConfig.getDescription());
                continue;
            }

            String name = imageConfig.getName();

            ImageName imageName = new ImageName(name);
            String configuredRegistry = EnvUtil.firstRegistryOf(
                imageName.getRegistry(),
                imageConfig.getRegistry(),
                registryConfig.getRegistry());

            BuildArgResolver buildArgResolver = new BuildArgResolver(log);
            Map<String, String> buildArgsFromExternalSources = buildArgResolver.resolveBuildArgs(buildContext);
            AuthConfig authConfigForLegacyPush = createAuthConfig(true, imageName.getUser(), configuredRegistry, registryConfig);
            AuthConfigList authConfigListForBuildXPush = createCompleteAuthConfigList(true, imageConfig, registryConfig, buildContext.getMojoParameters(), buildArgsFromExternalSources);

            if (imageConfig.isBuildX()) {
                buildXService.push(projectPaths, imageConfig, configuredRegistry, authConfigListForBuildXPush);
            } else {
                dockerPush(retries, skipTag, buildConfig, name, configuredRegistry, authConfigForLegacyPush);
            }
        }
    }
Push a set of images to a registry

@param imageConfigs images to push (but only if they have a build configuration)
@param retries how often to retry
@param registryConfig a global registry configuration
@param skipTag flag to skip pushing tagged images
@throws DockerAccessException
@throws MojoExecutionException
src/main/java/io/fabric8/maven/docker/service/RegistryService.java