{"id":34634826,"url":"https://github.com/flori/all_images","last_synced_at":"2026-01-18T07:14:52.735Z","repository":{"id":57679481,"uuid":"492338138","full_name":"flori/all_images","owner":"flori","description":"Run scripts across multiple Docker images e. g. automatic software tests","archived":false,"fork":false,"pushed_at":"2026-01-02T03:21:47.000Z","size":52,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-07T11:19:15.320Z","etag":null,"topics":["docker","ruby","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/flori.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-14T22:30:54.000Z","updated_at":"2026-01-02T03:21:49.000Z","dependencies_parsed_at":"2025-12-24T17:00:25.639Z","dependency_job_id":null,"html_url":"https://github.com/flori/all_images","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"736f16ee930beb7c38698716c34eb548195a3410"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/flori/all_images","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flori%2Fall_images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flori%2Fall_images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flori%2Fall_images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flori%2Fall_images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flori","download_url":"https://codeload.github.com/flori/all_images/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flori%2Fall_images/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28532795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["docker","ruby","testing"],"created_at":"2025-12-24T17:00:12.302Z","updated_at":"2026-01-18T07:14:52.728Z","avatar_url":"https://github.com/flori.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AllImages - Runs a script in all of the docker images\n\n## Description 📝\n\nAllImages is a Ruby-based command-line tool that automates running scripts\nacross multiple Docker images. It provides a configuration-driven approach to\ntesting and executing code in containerized environments, supporting both batch\nexecution and interactive debugging.\n\n## Architecture Overview 🏗️\n\nAllImages follows a well-defined architectural pattern with clear separation of\nconcerns between several key components:\n\n### Core Components 🧩\n\n**Application Class** (`AllImages::App`)\n- The central hub managing command-line interface, configuration loading, and\n  Docker operations 🔄\n- Handles command processing and execution flow 🚦\n- Manages Docker image building, tagging, and cleanup 🔧\n- Provides environment variable handling and error reporting 🛡️\n\n**Configuration Manager** (`AllImages::Config`)\n- Centralized configuration handling via YAML files 📄\n- Manages default configuration generation and loading 🔄\n- Provides example configuration templates 📋\n\n### Component Interactions 🔄\n\n```mermaid\ngraph LR\n    A[AllImages::App] --\u003e B[Configuration]\n    A --\u003e C[Docker Operations]\n    A --\u003e D[SearchUI]\n    B --\u003e E[YAML Files]\n    C --\u003e F[Docker Engine]\n    D --\u003e G[User Interface]\n```\n\nThe `AllImages::App` acts as the main coordinator, loading configuration files\nand orchestrating Docker operations. The SearchUI enables interactive image\nselection, while Docker operations handle the actual container execution.\n\n### Loading Mechanism 📥\n\nAllImages supports automatic configuration file generation when none exists:\n\n1. **Automatic initialization** when `.all_images.yml` is missing 🚨\n2. **Configuration loading** from specified YAML files 📁\n3. **Default configuration** with example content provided 📋\n\n### Command Execution Flow 🔄\n\nAllImages supports multiple execution modes:\n\n- **Batch execution**: Run scripts across all configured images (`run_all`)\n- **Selective execution**: Run scripts on specific images (`run \u003cimage\u003e`)\n- **Interactive debugging**: Debug scripts in containerized environments (`debug \u003cimage\u003e`)\n- **Listing**: Display available images (`ls`)\n- **Help**: Show usage information (`help`)\n\n## Use Case: Multi-Version Ruby Testing 🧪\n\nAllImages is particularly useful for running tests/specs across different Ruby\nversions and platforms. This makes it an excellent tool for:\n\n- **Cross-version compatibility testing** - Ensuring your code works across\n  multiple Ruby versions\n- **Platform consistency verification** - Testing on different operating\n  systems and environments\n- **CI/CD pipeline automation** - Automating test execution across multiple\n  environments\n- **Dependency resolution testing** - Verifying how your code behaves with\n  different dependency versions\n\n### Example: Ruby Version Testing\n\n```yaml\ndockerfile: |-\n  RUN apk add --no-cache build-base yaml-dev openssl-dev git\n  RUN gem update --system\n  RUN gem install bundler gem_hadar\n\nscript: \u0026script |-\n  echo -e \"\\e[1m\"\n  ruby -v\n  echo -e \"\\e[0m\"\n  bundle update --all\n  bundle install --jobs=$(getconf _NPROCESSORS_ONLN)\n  rake spec\n\nfail_fast: true\n\nimages:\n  ruby:3.4-alpine: *script\n  ruby:3.3-alpine: *script\n  ruby:3.2-alpine: *script\n  ruby:3.1-alpine: *script\n```\n\nThis configuration automatically runs your test suite across Ruby 3.4, 3.3,\n3.2, and 3.1, ensuring compatibility across versions.\n\n## Installation 📦\n\nYou can install AllImages via RubyGems:\n\n```bash\ngem install all_images\n```\n\nOr add it to your Gemfile:\n\n```ruby\ngem 'all_images'\n```\n\n## Usage 🛠️\n\n### Basic Workflow\n\n1. Run `all_images` to generate a default `.all_images.yml` configuration file\n2. Customize the configuration file to define your Docker images and scripts\n3. Execute commands to run scripts across images\n\n### Command Examples 📋\n\n```bash\n# Run scripts across all configured images\nall_images run_all\n\n# Or\n\nall_images\n\n# Run script on a specific image\nall_images run ruby:3.4-alpine\n\n# Debug script in a specific image interactively\nall_images debug ruby:3.4-alpine\n\n# List available images\nall_images ls\n\n# Show help information\nall_images help\n```\n\n### Configuration File Structure 📄\n\nGiven a configuration file like `.all_images.yml`:\n\n```yaml\ndockerfile: |-\n  RUN apk add --no-cache build-base yaml-dev openssl-dev git\n  RUN gem update --system\n  RUN gem install bundler gem_hadar\n\nscript: \u0026script |-\n  echo -e \"\\e[1m\"\n  ruby -v\n  echo -e \"\\e[0m\"\n  bundle update --all\n  bundle install --jobs=$(getconf _NPROCESSORS_ONLN)\n  rake spec\n\nfail_fast: true\n\nimages:\n  ruby:3.4-alpine: *script\n  ruby:3.3-alpine: *script\n  ruby:3.2-alpine: *script\n```\n\n### Environment Variables 🧪\n\nAllImages supports environment variable handling:\n- Configuration-defined environment variables are passed to containers\n- `TERM` environment variable is automatically included if present\n- Variables can be specified in the configuration file using `env` key\n\n### Docker Integration 🔧\n\nThe tool automatically:\n- Pulls base Docker images from Docker Hub\n- Builds custom Docker images with scripts\n- Runs containers with proper volume mounting\n- Cleans up containers after execution\n- Supports both interactive and non-interactive modes\n\n## Advanced Features 🚀\n\n### Interactive Debugging 🛠️\n\n```bash\n# Start interactive session in container\nall_images debug ruby:3.4-alpine\n```\n\nThis provides a shell prompt inside the container for debugging scripts.\n\n### Failure Handling ⚠️\n\nThe `fail_fast` configuration option stops execution on first failure:\n```yaml\nfail_fast: true\n```\n\n### Searchable Image Selection 🎯\n\nWhen no image is specified, AllImages provides an interactive search interface:\n```bash\nall_images run\n# Shows searchable list of available images\n```\n\n### Pre/Post Execution Hooks 🔄\n\nAllImages supports pre/post execution hooks in your configuration:\n\n```yaml\nbefore: |-\n  echo 🏁 Preparing…\n  echo Deleting Gemfile.lock\n  rm -f Gemfile.lock\n\nafter: |-\n  if [[ \"$RESULT\" = \"1\" ]]\n  then\n    echo 😵 Some tests failed!\n  else\n    echo 🥳 All tests passed!\n  fi\n\n# ... rest of your configuration\n```\n\n- `before` hook runs before each image execution\n- `after` hook runs after each image execution with `RESULT` environment variable\n- `RESULT` indicates success (0) or failure (1) of the test script\n- Hooks are non-fatal (won't stop the workflow if they fail)\n\n## Error Handling ⚠️\n\nAllImages provides comprehensive error handling for common scenarios:\n\n### Configuration Errors 📁\n- Missing configuration file (automatically generates example)\n- Invalid YAML syntax in configuration files\n\n### Docker Errors 🔧\n- Failed Docker image pulls\n- Build failures\n- Container execution errors\n\n### Command Errors 🚨\n- Invalid command-line arguments\n- Missing required parameters\n\n### Container Cleanup\n\nAllImages ensures proper cleanup of Docker containers even on failures:\n- Automatic removal of containers after execution\n- Temporary build directories are cleaned up automatically\n\n### Logging\n\nThe tool provides colored output for better visibility:\n- Success messages in green\n- Failure messages in red\n- Informational messages in white with blue background\n\n## Configuration ⚙️\n\n### Default Configuration\n\nWhen no `.all_images.yml` file exists, AllImages generates a default\nconfiguration with example content:\n\n```yaml\ndockerfile: |-\n  RUN apk add --no-cache build-base yaml-dev openssl-dev git\n  RUN gem update --system\n  RUN gem install bundler gem_hadar\n\nscript: \u0026script |-\n  echo -e \"\\e[1m\"\n  ruby -v\n  echo -e \"\\e[0m\"\n  bundle update --all\n  bundle install --jobs=$(getconf _NPROCESSORS_ONLN)\n  rake spec\n\nfail_fast: true\n\nimages:\n  ruby:3.4-alpine: *script\n  ruby:3.3-alpine: *script\n  ruby:3.2-alpine: *script\n```\n\n## Security Considerations ⚠️\n\n### Docker Security\n- Containers run with mounted current directory for script access\n- Temporary build directories are cleaned up automatically\n- No privileged operations are performed\n\n### Script Security\n- Scripts are executed within isolated Docker containers\n- No direct access to host system (except mounted directories)\n- Container cleanup ensures no residual artifacts\n\n## Download 📥\n\nThe homepage of this library is located at\n\n* https://github.com/flori/all_images\n\n## Author 👨‍💻\n\n[Florian Frank](mailto:flori@ping.de)\n\n## License 📄\n\nThis software is licensed under the [MIT license](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflori%2Fall_images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflori%2Fall_images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflori%2Fall_images/lists"}