{"id":46585081,"url":"https://github.com/hoverkraft-tech/docker-base-images","last_synced_at":"2026-05-05T09:02:30.612Z","repository":{"id":95536390,"uuid":"602913502","full_name":"hoverkraft-tech/docker-base-images","owner":"hoverkraft-tech","description":"Opiniated Docker base images","archived":false,"fork":false,"pushed_at":"2026-02-27T04:11:48.000Z","size":331,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-27T11:43:41.795Z","etag":null,"topics":["continuous-integration","docker","images","open-source"],"latest_commit_sha":null,"homepage":"https://docs.hoverkraft.cloud/docs/projects/ci-cd-tools/docker-base-images/","language":"JavaScript","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/hoverkraft-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-02-17T08:01:25.000Z","updated_at":"2026-02-20T06:57:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"8482b4b9-2992-40d8-8430-43b3611b87a6","html_url":"https://github.com/hoverkraft-tech/docker-base-images","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/hoverkraft-tech/docker-base-images","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoverkraft-tech%2Fdocker-base-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoverkraft-tech%2Fdocker-base-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoverkraft-tech%2Fdocker-base-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoverkraft-tech%2Fdocker-base-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoverkraft-tech","download_url":"https://codeload.github.com/hoverkraft-tech/docker-base-images/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoverkraft-tech%2Fdocker-base-images/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30212485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T09:02:10.694Z","status":"ssl_error","status_checked_at":"2026-03-07T09:02:08.429Z","response_time":53,"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":["continuous-integration","docker","images","open-source"],"created_at":"2026-03-07T12:02:17.169Z","updated_at":"2026-05-05T09:02:30.553Z","avatar_url":"https://github.com/hoverkraft-tech.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-base-images\n\nOpinionated Docker base images.\n\nThis repository offers:\n\n- a set of Docker base images that can be used as a foundation for building other Docker images.\n- GitHub Actions and reusable workflows to help you build and publish your own \"Docker base images\" repository.\n\n## Our images\n\n### [argocd-cmp-hk-deployment](images/argocd-cmp-hk-deployment/README.md)\n\n### [ci-helm](images/ci-helm/README.md)\n\nA Docker image with all the tools needed to validate an helm chart\n\n- helm chart-testing (aka ct)\n- helm kubeconform plugin\n\n### [mydumper](images/mydumper/README.md)\n\nAn image with an opiniated mydumper command as entrypoint\n\n### [testcontainers-node](images/testcontainers-node/README.md)\n\nA Docker image for running testcontainers tests with Node.js\n\n## Actions\n\n_Actions that you can plug directly into your own Docker images repository._\n\n### - [Get available images](actions/get-available-images/README.md)\n\n### - [Should build images](actions/should-build-images/README.md)\n\n## Reusable Workflows\n\n### Get available images matrix\n\n_Orchestrated workflows you can plug directly into your own Docker images repository._\n\n### - [Continuous Integration](.github/workflows/continuous-integration.md)\n\n### - [Prune pull requests images tags](.github/workflows/prune-pull-requests-images-tags.md)\n\n### - [Get available images matrix](.github/workflows/get-available-images-matrix.md)\n\n## Contributing\n\nContributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/docker-base-images/blob/main/CONTRIBUTING.md) for more details.\n\n### Action Structure Pattern\n\nAll actions follow this consistent structure:\n\n```text\nactions/{category}/{action-name}/\n├── action.yml          # Action definition with inputs/outputs\n├── README.md          # Usage documentation\n└── *.js              # Optional Node.js scripts (e.g., prepare-site.js)\n```\n\n### Development Standards\n\n#### Action Definition Standards\n\n1. **Consistent branding**: All actions use `author: hoverkraft`, `icon: \u003cspecific-icon\u003e`, `color: blue`\n2. **Composite actions**: Use `using: \"composite\"` with GitHub Script for complex logic\n3. **Pinned dependencies**: Always pin action versions with SHA (e.g., `@ed597411d8f924073f98dfc5c65a23a2325f34cd`)\n4. **Input validation**: Validate inputs early in GitHub Script steps\n\n#### JavaScript Patterns\n\n- **Class-based architecture**: Use classes like `AssetManager` for complex functionality\n- **Path utilities**: Extensive use of Node.js `path` module for cross-platform compatibility\n- **Regular expression patterns**: Define constants for reusable patterns (`MARKDOWN_IMAGE_REGEX`, `HTML_IMAGE_REGEX`)\n- **Caching**: Implement Map-based caching for expensive operations\n\n### Development Workflow\n\n#### Prerequisites\n\n- [Docker](https://docs.docker.com/get-docker/)\n- Make\n\n#### Linting \u0026 Testing\n\n```bash\nmake lint        # Run Super Linter (dockerized)\nmake lint-fix    # Auto-fix issues where possible\n\n# Run tests for a specific image\nmake test ci-helm      # Build and test ci-helm image\nmake test mydumper     # Build and test mydumper image\n\n# Run tests for all images\nmake test-all          # Build and test all images\n\n# Use GitHub Actions locally with `act`\ngh act -W .github/workflows/workflow-file-to-test.yml\n```\n\n**Testing Infrastructure:**\n\nTests use [testcontainers](https://testcontainers.com/modules/nodejs/) for Node.js to validate Docker images. The test framework:\n\n- Requires only Docker and Make (no local Node.js installation needed for `make test`)\n- Runs tests in a containerized environment for consistency\n- Tests are colocated with their respective images (e.g., `images/ci-helm/ci-helm.test.js`)\n- Each test validates: command availability, file existence, metadata, and environment variables\n- All tests share a single Node.js module in `images/testcontainers-node/`\n\nHow tests are executed in this repository:\n\n- `make test \u003cimage\u003e` builds the image and runs tests inside the `images/testcontainers-node` runner image.\n- Each test run also writes a JUnit report to `images/\u003cimage\u003e/junit.xml`.\n- The harness injects:\n  - `TESTED_IMAGE_REF`: the image ref to test (e.g. `ci-helm:latest` locally, or an OCI ref in CI)\n\n**Writing good image tests (recommended):**\n\n- Keep tests **black-box**: validate behavior via commands, files, users, workdir, and env.\n- Make tests **deterministic**: avoid network calls and time-based assertions when possible.\n- Start the container once per suite (`before`/`after`) and **always clean up**.\n- Prefer `container.exec(cmd, { env, workingDir })` over shell string interpolation for env handling.\n- Use a long-running command like `sleep infinity` so you can run multiple `exec` checks.\n\nBasic example (`images/\u003cimage\u003e/\u003cimage\u003e.test.js`):\n\n```js\nimport { after, before, describe, it } from \"node:test\";\nimport assert from \"node:assert\";\nimport { GenericContainer } from \"testcontainers\";\n\ndescribe(\"My Image\", () =\u003e {\n  const testedImageRef = process.env.TESTED_IMAGE_REF;\n  let container;\n\n  if (!testedImageRef) {\n    throw new Error(\"TESTED_IMAGE_REF environment variable is required\");\n  }\n\n  before(async () =\u003e {\n    container = await new GenericContainer(testedImageRef)\n      .withCommand([\"sleep\", \"infinity\"])\n      .start();\n  });\n\n  after(async () =\u003e {\n    await container?.stop();\n  });\n\n  it(\"has the expected tool\", async () =\u003e {\n    const { exitCode, output } = await container.exec([\"mytool\", \"--version\"], {\n      env: { MY_FLAG: \"1\" },\n      workingDir: \"/\",\n    });\n\n    assert.strictEqual(exitCode, 0);\n    assert.match(output, /mytool/i);\n  });\n\n  it(\"runs as the expected user\", async () =\u003e {\n    const { exitCode, output } = await container.exec([\"id\", \"-un\"]);\n    assert.strictEqual(exitCode, 0);\n    assert.strictEqual(output.trim(), \"myuser\");\n  });\n});\n```\n\n#### File Conventions\n\n- **Dockerfile**: Uses Super Linter slim image for consistent code quality\n- **Tests**: Located in each image directory (e.g., `images/*/\u003cimage\u003e.test.js`) using [testcontainers](https://testcontainers.com/modules/nodejs/) for Node.js\n- **Workflows**: Private workflows prefixed with `__` (e.g., `__main-ci.yml`)\n\n#### Action Development Conventions\n\n**Always follow these patterns when creating/modifying actions:**\n\n1. **Pinned Dependencies**: Use exact SHA commits for all action dependencies:\n\n   ```yaml\n   uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0\n   ```\n\n2. **Consistent Branding**: Every action.yml must include:\n\n   ```yaml\n   author: hoverkraft\n   branding:\n     icon: \u003cspecific-icon\u003e\n     color: blue\n   ```\n\n3. **Input Validation**: Always validate inputs early in GitHub Script steps:\n   ```javascript\n   const urlInput = ${{ toJson(inputs.url ) }};\n   if (!urlInput) {\n     return core.setFailed(\"URL input is required.\");\n   }\n   ```\n\n#### JavaScript Development Patterns\n\n**For `actions/github-script` steps (composite actions):**\n\n- Prefer small, focused scripts with early input validation.\n- Use Node.js built-ins via `node:` (e.g., `node:path`).\n- Keep outputs stable and JSON-encoded when returning structured data.\n- Favor readable helpers (small functions) over clever one-liners.\n\n#### File Structure Understanding\n\n```text\nactions/                              # Composite actions (using actions/github-script)\n├── get-available-images/\n│   ├── action.yml\n│   └── README.md\n└── ***/\n  ├── action.yml\n  └── README.md\n\n.github/workflows/                    # Reusable workflows (+ their .md docs)\n├── continuous-integration.yml\n├── continuous-integration.md\n├── ***.yml\n├── ***.md\n└── __*.yml                           # Private/internal workflows\n\nimages/                               # Docker images (each image is self-contained)\n└── \u003cimage\u003e/\n  ├── Dockerfile\n  ├── README.md\n  ├── \u003cimage-name\u003e.test.js          # Node.js tests (run via make/CI)\n  └── tests/                        # Optional fixtures used by some tests\n```\n\n### Continuous Integration\n\n#### Pull requests\n\n##### Pull requests checks\n\n- Validate that pull request title respects conventional commit\n- Run linters against modified files\n\n##### Pull requests build\n\n- Build images that have been modified\n- Tag with Pull request number and commit sha\n\n##### Pull requests cleaning\n\n- Remove all tags create during Pull request builds\n\n##### Release\n\n###### Release checks\n\n- Run linters against modified files\n\n##### Release build\n\n- Build images that have been modified\n- Tag respecting sementic versioning\n\n## Author\n\n🏢 **Hoverkraft \u003ccontact@hoverkraft.cloud\u003e**\n\n- Site: [https://hoverkraft.cloud](https://hoverkraft.cloud)\n- GitHub: [@hoverkraft-tech](https://github.com/hoverkraft-tech)\n\n## License\n\nThis project is licensed under the MIT License.\n\nSPDX-License-Identifier: MIT\n\nCopyright © 2025 hoverkraft-tech\n\nFor more details, see the [license](http://choosealicense.com/licenses/mit/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoverkraft-tech%2Fdocker-base-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoverkraft-tech%2Fdocker-base-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoverkraft-tech%2Fdocker-base-images/lists"}