Exemplo n.º 1
0
        protected override IContainerizer CreateContainerizer(FibCliConfiguration configuration)
        {
            var dockerImage = DockerDaemonImage.Named(configuration.GetTargetImageReference());

            // if(configuration.TargetImageCredential!=null && !string.IsNullOrEmpty(configuration.TargetImageCredential.UserName)
            //                                              && !string.IsNullOrEmpty(configuration.TargetImageCredential.Password))
            // {
            //     dockerImage.AddCredential(configuration.TargetImageCredential.UserName, configuration.TargetImageCredential.Password);
            // }
            return(Containerizer.To(dockerImage));
        }
Exemplo n.º 2
0
        protected override IContainerizer CreateContainerizer(FibCliConfiguration configuration)
        {
            var toImage = RegistryImage.Named(configuration.GetTargetImageReference());

            if (configuration.TargetImageCredential != null && !string.IsNullOrEmpty(configuration.TargetImageCredential.UserName) &&
                !string.IsNullOrEmpty(configuration.TargetImageCredential.Password))
            {
                toImage.AddCredential(configuration.TargetImageCredential.UserName, configuration.TargetImageCredential.Password);
            }
            return(Containerizer.To(toImage));
        }
Exemplo n.º 3
0
        protected override IContainerizer CreateContainerizer(FibCliConfiguration configuration)
        {
            if (!Path.IsPathRooted(OutputFile))
            {
                OutputFile = Path.Combine(Directory.GetCurrentDirectory(), OutputFile);
            }
            var tarImage = TarImage.Named(configuration.GetTargetImageReference()).SaveTo(OutputFile);

            // if(configuration.TargetImageCredential!=null && !string.IsNullOrEmpty(configuration.TargetImageCredential.UserName)
            //                                              && !string.IsNullOrEmpty(configuration.TargetImageCredential.Password))
            // {
            //     tarImage.AddCredential(configuration.TargetImageCredential.UserName, configuration.TargetImageCredential.Password);
            // }
            return(Containerizer.To(tarImage));
        }