{"id":28260881,"url":"https://github.com/sctg-development/clean-image-for-docker","last_synced_at":"2026-01-26T01:31:23.066Z","repository":{"id":291081870,"uuid":"976519143","full_name":"sctg-development/clean-image-for-docker","owner":"sctg-development","description":"Github action: Clean Runner for Docker Builds","archived":false,"fork":false,"pushed_at":"2025-12-16T22:43:11.000Z","size":19,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-20T12:27:01.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/sctg-development.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2025-05-02T08:54:12.000Z","updated_at":"2025-12-16T22:14:22.000Z","dependencies_parsed_at":"2025-05-02T10:22:29.328Z","dependency_job_id":"ca7d9e7e-4272-4d2a-ae91-998800ad8208","html_url":"https://github.com/sctg-development/clean-image-for-docker","commit_stats":null,"previous_names":["sctg-development/clean-image-for-docker"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sctg-development/clean-image-for-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sctg-development%2Fclean-image-for-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sctg-development%2Fclean-image-for-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sctg-development%2Fclean-image-for-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sctg-development%2Fclean-image-for-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sctg-development","download_url":"https://codeload.github.com/sctg-development/clean-image-for-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sctg-development%2Fclean-image-for-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28763909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T00:37:26.264Z","status":"ssl_error","status_checked_at":"2026-01-26T00:37:25.959Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2025-05-20T05:11:13.338Z","updated_at":"2026-01-26T01:31:23.061Z","avatar_url":"https://github.com/sctg-development.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clean Runner for Docker Builds\n\nThis action cleans unnecessary packages and files from GitHub runners to optimize disk space for Docker multi-architecture builds.\n\n## Features\n\n- Removes large unnecessary packages and tools that are not needed for Docker builds\n  - Development tools (compilers, runtimes, build systems)\n  - Browser packages and WebDriver tools\n  - Database packages (MySQL, PostgreSQL, MongoDB)\n  - Cloud tools (Azure CLI, Google Cloud SDK, AWS CLI, etc.)\n  - Testing and analysis tools\n  - Documentation tools\n  - Android SDK and NDK\n  - Cached tool versions\n- Cleans up package manager cache\n- Removes large directories\n- Reports disk space saved before and after cleanup\n- Fully configurable cleanup options\n\n## Inputs\n\n| Input | Description | Default |\n|-------|-------------|---------|\n| `remove-development-tools` | Remove compilers and runtimes (Java, Go, Rust, Haskell, etc.) | `true` |\n| `remove-browsers` | Remove browsers and WebDriver tools (Chrome, Firefox, Edge) | `true` |\n| `remove-databases` | Remove database packages (MySQL, PostgreSQL, MongoDB) | `true` |\n| `remove-cloud-tools` | Remove cloud CLIs and tools | `true` |\n| `remove-testing-tools` | Remove testing and analysis tools (newman, packer, yamllint, etc.) | `true` |\n| `remove-documentation` | Remove documentation tools (sphinx, texinfo, emoji fonts) | `true` |\n| `remove-android` | Remove Android SDK and NDK | `true` |\n| `remove-cached-tools` | Remove cached tool versions (Go, Node.js, Python, Ruby) | `true` |\n| `show-top-packages` | Show the largest packages before and after cleanup | `true` |\n\n## Outputs\n\n| Output | Description |\n|--------|-------------|\n| `space-before` | Available disk space before cleaning (in GB) |\n| `space-after` | Available disk space after cleaning (in GB) |\n| `space-saved` | Disk space saved by cleaning (in GB) |\n\n## Usage\n\n```yaml\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n\n      - name: Clean runner for Docker builds\n        uses: sctg-development/clean-image-for-docker@v2\n        # Optional parameters (all default to true)\n        with:\n          remove-development-tools: 'true'\n          remove-browsers: 'true'\n          remove-databases: 'true'\n          remove-cloud-tools: 'true'\n          remove-testing-tools: 'true'\n          remove-documentation: 'true'\n          remove-android: 'true'\n          remove-cached-tools: 'true'\n          show-top-packages: 'true'\n          \n      - name: Set up QEMU\n        uses: docker/setup-qemu-action@v3\n        with:\n          platforms: \"arm64\"\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n\n      - name: Log in to Docker Hub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ secrets.DOCKER_USERNAME }}\n          password: ${{ secrets.DOCKER_PASSWORD }}\n\n      - name: Build and push Docker image\n        uses: docker/build-push-action@v6\n        continue-on-error: true\n        with:\n          platforms: linux/arm64, linux/amd64\n          cache-from: type=gha\n          cache-to: type=gha\n          push: true\n          tags: mydocker/myimage:1.0, mydocker/myimage:latest\n```\n\n## Example: Selective Cleanup\n\nIf you want to keep some tools (for example, keep Java but remove everything else):\n\n```yaml\n- name: Clean runner for Docker builds (keep Java)\n  uses: sctg-development/clean-image-for-docker@v2\n  with:\n    remove-development-tools: 'false'  # Keeps Java, Go, Rust, etc.\n    remove-browsers: 'true'\n    remove-databases: 'true'\n    remove-cloud-tools: 'true'\n    remove-testing-tools: 'true'\n    remove-documentation: 'true'\n    remove-android: 'true'\n    remove-cached-tools: 'true'\n```\n\n## Packages Removed by Category\n\n### Development Tools (remove-development-tools)\n- Compilers: GCC, Clang, LLVM, Gfortran\n- Runtimes: Java (OpenJDK, Temurin), Golang, Rust, Haskell, Julia, Kotlin, Swift\n- Build systems: Maven, Gradle, Ant, Bazel, CMake, Ninja\n- Other: Mono, Ruby (gruby)\n\n### Browsers (remove-browsers)\n- Google Chrome\n- Mozilla Firefox\n- Microsoft Edge\n\n### Databases (remove-databases)\n- MySQL\n- PostgreSQL\n- MongoDB\n\n### Cloud Tools (remove-cloud-tools)\n- Azure CLI\n- Google Cloud SDK\n- AWS CLI and SAM CLI\n- AzCopy\n- Bicep\n- Pulumi\n\n### Testing Tools (remove-testing-tools)\n- Newman\n- Packer\n- Yamllint\n- Shellcheck\n- Xvfb\n\n### Documentation (remove-documentation)\n- Sphinx\n- Texinfo\n- Emoji fonts\n- MediaInfo\n\n### Android (remove-android)\n- Android SDK\n- Android NDK\n\n### Cached Tools (remove-cached-tools)\n- Cached Go versions\n- Cached Node.js versions\n- Cached Python versions\n- Cached PyPy versions\n- Cached Ruby versions\n\n## Typical Disk Space Savings\n\nOn Ubuntu 24.04, typical disk space savings with default settings:\n- **Before**: ~23-25 GB available\n- **After**: ~35-40+ GB available\n- **Saved**: ~12-17 GB\n\n## License\n\nMIT License - See [LICENSE.md](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsctg-development%2Fclean-image-for-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsctg-development%2Fclean-image-for-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsctg-development%2Fclean-image-for-docker/lists"}