{"id":15406477,"url":"https://github.com/odlp/dmatrix","last_synced_at":"2026-04-16T00:31:38.097Z","repository":{"id":62557271,"uuid":"188864238","full_name":"odlp/dmatrix","owner":"odlp","description":"Parallel execution of a matrix with Docker","archived":false,"fork":false,"pushed_at":"2020-02-29T17:20:21.000Z","size":20,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-03T18:04:39.026Z","etag":null,"topics":["dependency-testing","docker","testing","version-testing"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/odlp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-27T15:01:55.000Z","updated_at":"2019-07-11T16:58:46.000Z","dependencies_parsed_at":"2022-11-03T06:15:41.908Z","dependency_job_id":null,"html_url":"https://github.com/odlp/dmatrix","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/odlp/dmatrix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odlp%2Fdmatrix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odlp%2Fdmatrix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odlp%2Fdmatrix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odlp%2Fdmatrix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/odlp","download_url":"https://codeload.github.com/odlp/dmatrix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odlp%2Fdmatrix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31866246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dependency-testing","docker","testing","version-testing"],"created_at":"2024-10-01T16:23:11.861Z","updated_at":"2026-04-16T00:31:38.056Z","avatar_url":"https://github.com/odlp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dmatrix\n\nDocker matrix. Parallel execution of each possible combination defined in your\nmatrix file.\n\nThe matrix file can contain `build_arg` and `env` values which will be passed\nto Docker during the image build and execution of your command.\n\nInspired by the [Travis Build Matrix](https://docs.travis-ci.com/user/build-matrix/).\n\n## Example\n\n### `.matrix.yaml`\n\n```yaml\nmatrix:\n  build_arg:\n    FROM_IMAGE:\n      - ruby:2.4-alpine\n      - ruby:2.5-alpine\n      - ruby:2.6-alpine\n    BUNDLE_GEMFILE:\n      - gemfiles/factory_bot_4_8.gemfile\n      - gemfiles/factory_bot_5.gemfile\n```\n\nThis would produce six combinations. In this example the `gemfiles` are created\nwith the [Appraisal gem](https://github.com/thoughtbot/appraisal).\n\n### `Dockerfile`\n\n```dockerfile\nARG FROM_IMAGE=ruby:2.6-alpine\nFROM $FROM_IMAGE\n\nRUN apk update \u0026\u0026 \\\n    apk add git \u0026\u0026 \\\n    mkdir -p /app/lib/my_gem\n\nWORKDIR /app\n\nCOPY Gemfile* my_gem.gemspec Appraisals /app/\nCOPY gemfiles/*.gemfile /app/gemfiles/\nCOPY lib/my_gem/version.rb /app/lib/my_gem/version.rb\n\nARG BUNDLE_GEMFILE=Gemfile\nENV BUNDLE_GEMFILE=$BUNDLE_GEMFILE\n\nRUN bundle install --jobs=4 --retry=3\n\nCOPY . /app\n```\n\n### Running a command\n\n```\nbundle exec dmatrix -- bundle exec rspec\n```\n\nThis would use `dmatrix` to build \u0026 run `bundle exec rspec` for each combination\nyour matrix defines. In your terminal you should see output like this:\n\n```\nmy_repo:ruby-2-4-alpine-gemfiles-factory_bot_4_8-gemfile   Build: success  Run: success\nmy_repo:ruby-2-4-alpine-gemfiles-factory_bot_5-gemfile     Build: success  Run: success\nmy_repo:ruby-2-5-alpine-gemfiles-factory_bot_4_8-gemfile   Build: success  Run: success\nmy_repo:ruby-2-5-alpine-gemfiles-factory_bot_5-gemfile     Build: success  Run: success\nmy_repo:ruby-2-6-alpine-gemfiles-factory_bot_4_8-gemfile   Build: success  Run: success\nmy_repo:ruby-2-6-alpine-gemfiles-factory_bot_5-gemfile     Build: success  Run: success\n```\n\nA build-log and run-log is written per combination in `./tmp/dmatrix`:\n\n```\nbuild-dmatrix-ruby-2-4-alpine-gemfiles-factory_bot_4_8-gemfile.log\nrun-dmatrix-ruby-2-4-alpine-gemfiles-factory_bot_4_8-gemfile.log\n# etc\n```\n\n## Setup\n\n### Get the gem\n\n```ruby\n# Gemfile\n\ngem \"dmatrix\"\n```\n\n### Create a matrix\n\nCreate a `.matrix.yaml` file:\n\n```yaml\nmatrix:\n  build_arg:\n    ARG1:\n      - abc\n      - def\n  env:\n    ENV1:\n      - 123\n      - 456\n```\n\nN.B. the `build_arg` and `env` keys can both contain multiple variants.\n\n### Adapt your Dockerfile\n\nWire-up the ARG and ENV variables as required.\n\n### Run\n\n```\nbundle exec dmatrix -- \u003cyour command\u003e\n```\n\nIf no command is specified the default Docker command will run.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodlp%2Fdmatrix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodlp%2Fdmatrix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodlp%2Fdmatrix/lists"}