{"id":18684997,"url":"https://github.com/h1alexbel/cdit","last_synced_at":"2025-04-12T04:32:46.063Z","repository":{"id":211235601,"uuid":"728147980","full_name":"h1alexbel/cdit","owner":"h1alexbel","description":"A Collection of Pre-Configured Docker Containers for your Integration Tests","archived":true,"fork":false,"pushed_at":"2024-03-05T23:20:59.000Z","size":75,"stargazers_count":6,"open_issues_count":9,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-04T18:45:59.185Z","etag":null,"topics":["docker","integration-testing","java","testcontainers"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/h1alexbel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-12-06T10:29:59.000Z","updated_at":"2024-03-07T07:46:53.000Z","dependencies_parsed_at":"2024-02-25T16:23:40.306Z","dependency_job_id":"705bbc1d-95b2-4927-8992-3b57532c6026","html_url":"https://github.com/h1alexbel/cdit","commit_stats":null,"previous_names":["h1alexbel/cdit"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h1alexbel%2Fcdit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h1alexbel%2Fcdit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h1alexbel%2Fcdit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h1alexbel%2Fcdit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h1alexbel","download_url":"https://codeload.github.com/h1alexbel/cdit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248517351,"owners_count":21117437,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","integration-testing","java","testcontainers"],"created_at":"2024-11-07T10:19:58.849Z","updated_at":"2025-04-12T04:32:41.050Z","avatar_url":"https://github.com/h1alexbel.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg alt=\"logo\" src=\"https://www.objectionary.com/cactus.svg\" height=\"100px\" /\u003e\n\n[![Managed By Self XDSD](https://self-xdsd.com/b/mbself.svg)](https://self-xdsd.com/p/h1alexbel/cdit?provider=github)\n\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n[![DevOps By Rultor.com](https://www.rultor.com/b/h1alexbel/cdit)](https://www.rultor.com/p/h1alexbel/cdit)\n[![We recommend IntelliJ IDEA](https://www.elegantobjects.org/intellij-idea.svg)](https://www.jetbrains.com/idea/)\n\u003cbr\u003e\n\n[![mvn](https://github.com/h1alexbel/cdit/actions/workflows/mvn.yml/badge.svg)](https://github.com/h1alexbel/cdit/actions/workflows/mvn.yml)\n[![maven central](http://maven-badges.herokuapp.com/maven-central/io.github.h1alexbel/cdit/badge.svg)](https://search.maven.org/artifact/io.github.h1alexbel/cdit)\n[![javadoc](https://javadoc.io/badge2/io.github.h1alexbel/cdit/javadoc.svg)](https://javadoc.io/doc/io.github.h1alexbel/cdit)\n[![codecov](https://codecov.io/gh/h1alexbel/cdit/graph/badge.svg?token=V2VWAvE2f7)](https://codecov.io/gh/h1alexbel/cdit)\n\n[![Hits-of-Code](https://hitsofcode.com/github/h1alexbel/cdit)](https://hitsofcode.com/view/github/h1alexbel/cdit)\n[![Lines-of-Code](https://tokei.rs/b1/github/h1alexbel/cdit)](https://github.com/h1alexbel/cdit)\n[![PDD status](http://www.0pdd.com/svg?name=h1alexbel/cdit)](http://www.0pdd.com/p?name=h1alexbel/cdit)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/h1alexbel/cdit/blob/master/LICENSE.txt)\n\nProject architect: [@h1alexbel](https://github.com/h1alexbel)\n\nA Collection of Pre-Configured Docker Containers for your Integration Tests.\n\n**Motivation**. We are not happy with configuring Testcontainers again and again the same way,\nso we create a \"hosted\" home and fill it with common pre-configured Docker containers for integration testing.\n\n**Principles**. These are the [design principles](https://www.elegantobjects.org/#principles) behind cdit.\n\n**How to use**. All you need is this (get the latest version [here](https://search.maven.org/artifact/io.github.h1alexbel/cdit)):\n\nMaven:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.h1alexbel\u003c/groupId\u003e\n  \u003cartifactId\u003ecdit\u003c/artifactId\u003e\n  \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\nGradle:\n```groovy\ndependencies {\n    testCompile 'io.github.h1alexbel:cdit:\u003cversion\u003e'\n}\n```\n\n## Running Containers\n\nTo create Docker container, for instance [PostgreSQL](https://hub.docker.com/_/postgres), you can use\n```java\nimport org.cdit.containers.Postgres;\nimport org.cdit.containers.Env;\n\nnew Postgres(\n  \"latest\",\n  new Env(\"POSTGRES_USER\", \"user\"),\n  new Env(\"POSTGRES_PASSWORD\", \"AAAA...CCCC\")\n).run();\n```\nNow Docker container is up and running.\n\n## Creating Custom Containers\n\nIf you want to create your own container, you can extend [ContainerEnvelope](https://github.com/h1alexbel/cdit/blob/master/src/main/java/org/cdit/ContainerEnvelope.java)\nthis way\n\n```java\nimport org.cdit.ContainerEnvelope;\n\npublic final class MyPrivateContainer extends ContainerEnvelope {\n  public MyPrivateContainer(final String tag, final Env... vars) {\n    super(\"ecr.io/myprivate:%s\".formatted(tag), vars);\n  }\n}\n```\n\nnow, you can run it\n```java\nnew MyPrivateContainer(\"0.0.1\", new Env(\"test\", \"true\")).run();\n```\n\nIf you need more flexible configuration, it can be achieved by implementing [Container](https://github.com/h1alexbel/cdit/blob/master/src/main/java/org/cdit/Container.java)\n\n```java\nimport org.cdit.Container;\nimport org.testcontainers.containers.GenericContainer;\n\npublic final class MyPrivateContainer implements Container {\n\n  @Override\n  public GenericContainer\u003c?\u003e run() {\n    // your code\n  }\n}\n```\n\n## How to Contribute\n\nFork repository, make changes, send us a [pull request](https://www.yegor256.com/2014/04/15/github-guidelines.html).\nWe will review your changes and apply them to the `master` branch shortly,\nprovided they don't violate our quality standards. To avoid frustration,\nbefore sending us your pull request please run full Maven build:\n\n```bash\n$ mvn clean install -Pinvoker\n```\n\nYou will need Maven 3.8.7+ Java 17+, and Docker.\n\nOur [rultor image](https://github.com/eo-cqrs/eo-kafka-rultor-image) for CI/CD.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh1alexbel%2Fcdit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh1alexbel%2Fcdit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh1alexbel%2Fcdit/lists"}