Beispiel #1
0
 public static IDockerEnvironmentBuilder AddMongoSingleReplicaSetContainer(
     this IDockerEnvironmentBuilder builder,
     string name,
     string replicaSetName = "rs0",
     string imageName      = "mongo",
     string tag            = "latest",
     ushort?port           = null,
     IDictionary <string, string> environmentVariables = null,
     bool reuseContainer = false)
 {
     return(builder.AddDependency(
                new MongoSingleReplicaSetContainer(
                    builder.DockerClient,
                    name.GetContainerName(builder.EnvironmentName),
                    replicaSetName,
                    imageName,
                    tag,
                    port,
                    environmentVariables,
                    builder.IsDockerInDocker,
                    reuseContainer,
                    new MongoSingleReplicaSetContainerWaiter(builder.Logger),
                    new MongoContainerCleaner(builder.Logger),
                    builder.Logger)));
 }
 public static IDockerEnvironmentBuilder AddPostgresContainer(
     this IDockerEnvironmentBuilder builder,
     string name,
     string userName  = "******",
     string password  = "******",
     string imageName = "postgres",
     string tag       = "latest",
     IDictionary <string, string> environmentVariables = null,
     IDictionary <ushort, ushort> ports = null,
     bool reuseContainer = false)
 {
     return(builder.AddDependency(
                new PostgresContainer(
                    builder.DockerClient,
                    name.GetContainerName(builder.EnvironmentName),
                    userName,
                    password,
                    imageName,
                    tag,
                    new Dictionary <string, string>
     {
         { "POSTGRES_USER", userName },
         { "POSTGRES_PASSWORD", password }
     }.MergeDictionaries(environmentVariables),
                    ports,
                    builder.IsDockerInDocker,
                    reuseContainer,
                    new PostgresContainerWaiter(builder.Logger),
                    new PostgresContainerCleaner(builder.Logger, userName),
                    builder.Logger)));
 }
Beispiel #3
0
 public static IDockerEnvironmentBuilder AddMongoContainer(
     this IDockerEnvironmentBuilder builder,
     string name,
     string userName     = "******",
     string userPassword = "******",
     string imageName    = "mongo",
     string tag          = "latest",
     IDictionary <string, string> environmentVariables = null,
     IDictionary <ushort, ushort> ports = null,
     bool reuseContainer = false)
 {
     return(builder.AddDependency(
                new MongoContainer(
                    builder.DockerClient,
                    name.GetContainerName(builder.EnvironmentName),
                    userName,
                    userPassword,
                    imageName,
                    tag,
                    new Dictionary <string, string>
     {
         { "MONGO_INITDB_ROOT_USERNAME", userName },
         { "MONGO_INITDB_ROOT_PASSWORD", userPassword }
     }.MergeDictionaries(environmentVariables),
                    ports,
                    builder.IsDockerInDocker,
                    reuseContainer,
                    new MongoContainerWaiter(builder.Logger),
                    new MongoContainerCleaner(builder.Logger),
                    builder.Logger)));
 }
Beispiel #4
0
 public static IDockerEnvironmentBuilder AddFtpContainer(
     this IDockerEnvironmentBuilder builder,
     string name,
     string ftpUserName,
     string ftpPassword,
     string imageName = "stilliard/pure-ftpd",
     string tag       = "hardened",
     IDictionary <string, string> environmentVariables = null,
     IDictionary <ushort, ushort> ports = null,
     bool reuseContainer = false) =>
 builder.AddDependency(new FtpContainer(builder.DockerClient, name.GetContainerName(builder.EnvironmentName), ftpUserName, ftpPassword, imageName, tag, environmentVariables, ports, builder.IsDockerInDocker, reuseContainer, builder.Logger));
 public static IDockerEnvironmentBuilder AddMailContainer(
     this IDockerEnvironmentBuilder builder,
     string name,
     string imageName      = "mailhog/mailhog",
     string tag            = "latest",
     ushort smptPort       = 1025,
     ushort apiPort        = 8025,
     string deleteEndpoint = "api/v1/messages",
     IDictionary <string, string> environmentVariables = null,
     IDictionary <ushort, ushort> ports = null,
     bool reuseContainer = false) =>
 builder.AddDependency(new MailContainer(builder.DockerClient, name.GetContainerName(builder.EnvironmentName), imageName, tag, smptPort, apiPort, deleteEndpoint, environmentVariables, ports, builder.IsDockerInDocker, reuseContainer, builder.Logger));
Beispiel #6
0
 public static IDockerEnvironmentBuilder AddMssqlContainer(this IDockerEnvironmentBuilder builder, string name, string saPassword, string imageName = "microsoft/mssql-server-linux", string tag = "latest", IDictionary <string, string> environmentVariables = null, IDictionary <ushort, ushort> ports = null, bool reuseContainer = false) =>
 builder.AddDependency(new MssqlContainer(builder.DockerClient, name.GetContainerName(builder.EnvironmentName), saPassword, imageName, tag, environmentVariables, ports, builder.IsDockerInDocker, reuseContainer, builder.Logger));
 public static IDockerEnvironmentBuilder AddElasticsearchContainer(this IDockerEnvironmentBuilder builder, string name, string imageName = "docker.elastic.co/elasticsearch/elasticsearch-oss", string tag = "6.2.4", IDictionary <string, string> environmentVariables = null, bool reuseContainer = false) =>
 builder.AddDependency(new ElasticsearchContainer(builder.DockerClient, name.GetContainerName(builder.EnvitronmentName), imageName, tag, environmentVariables, builder.IsDockerInDocker, reuseContainer, builder.Logger));
 public static IDockerEnvironmentBuilder AddKafkaContainer(this IDockerEnvironmentBuilder builder, string name, string imageName = "johnnypark/kafka-zookeeper", string tag = "latest", IDictionary <string, string> environmentVariables = null, IDictionary <ushort, ushort> ports = null, bool reuseContainer = false) =>
 builder.AddDependency(new KafkaContainer(builder.DockerClient, name.GetContainerName(builder.EnvironmentName), imageName, tag, environmentVariables, ports, builder.IsDockerInDocker, reuseContainer, builder.Logger));
 public static IDockerEnvironmentBuilder AddElasticsearchContainer(this IDockerEnvironmentBuilder builder, string name) =>
 builder.AddDependency(new ElasticsearchContainer(builder.DockerClient, name, logger: builder.Logger, isDockerInDocker: builder.IsDockerInDocker));
 public static IDockerEnvironmentBuilder AddMssqlContainer(this IDockerEnvironmentBuilder builder, string name, string saPassword) =>
 builder.AddDependency(new MssqlContainer(builder.DockerClient, name, saPassword, logger: builder.Logger, isDockerInDocker: builder.IsDockerInDocker));