Exemplo n.º 1
0
        public TBuilder WithExposedPorts(params int[] ports)
        {
            fn = FnUtils.Compose(fn, (container) =>
            {
                container.ExposedPorts = ports;
                return(container);
            });

            return((TBuilder)this);
        }
Exemplo n.º 2
0
        public TBuilder WithImage(string dockerImageName)
        {
            fn = FnUtils.Compose(fn, (container) =>
            {
                container.DockerImageName = dockerImageName;
                return(container);
            });

            return((TBuilder)this);
        }
        public DatabaseContainerBuilder <TDatabaseContainer> WithPassword(string password)
        {
            fn = FnUtils.Compose(fn, (container) =>
            {
                container.Password = password;
                return(container);
            });

            return(this);
        }
        public DatabaseContainerBuilder <TDatabaseContainer> WithUserName(string userName)
        {
            fn = FnUtils.Compose(fn, (container) =>
            {
                container.UserName = userName;
                return(container);
            });

            return(this);
        }
Exemplo n.º 5
0
        public TBuilder WithImage(string dockerImageName)
        {
            fn = FnUtils.Compose(fn, (container) =>
            {
                var tag = dockerImageName.Split(':').Last();
                if (dockerImageName == tag || tag.Contains("/"))
                {
                    dockerImageName = $"{dockerImageName}:latest";
                }
                container.DockerImageName = dockerImageName;
                return(container);
            });

            return((TBuilder)this);
        }