{"id":19857908,"url":"https://github.com/googlecontainertools/rules_distroless","last_synced_at":"2025-08-11T14:44:08.950Z","repository":{"id":79768255,"uuid":"525424092","full_name":"GoogleContainerTools/rules_distroless","owner":"GoogleContainerTools","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-03T17:48:27.000Z","size":508,"stargazers_count":73,"open_issues_count":17,"forks_count":50,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-07-03T18:49:58.930Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoogleContainerTools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-16T14:49:47.000Z","updated_at":"2025-07-03T17:48:31.000Z","dependencies_parsed_at":"2023-11-18T00:09:41.596Z","dependency_job_id":"f3d7e39f-55e9-4b06-8306-282c3836e085","html_url":"https://github.com/GoogleContainerTools/rules_distroless","commit_stats":null,"previous_names":["googlecontainertools/rules_distroless"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/GoogleContainerTools/rules_distroless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleContainerTools%2Frules_distroless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleContainerTools%2Frules_distroless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleContainerTools%2Frules_distroless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleContainerTools%2Frules_distroless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleContainerTools","download_url":"https://codeload.github.com/GoogleContainerTools/rules_distroless/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleContainerTools%2Frules_distroless/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269905810,"owners_count":24494317,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"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":[],"created_at":"2024-11-12T14:20:12.896Z","updated_at":"2025-08-11T14:44:08.919Z","avatar_url":"https://github.com/GoogleContainerTools.png","language":"Starlark","readme":"# `rules_distroless`\n\nBazel helper rules to aid with some of the steps needed to create a Linux /\nDebian installation. These rules are designed to replace commands such as\n`apt-get install`, `passwd`, `groupadd`, `useradd`, `update-ca-certificates`.\n\n\u003e [!CAUTION]\n\u003e\n\u003e `rules_distroless` is currently in beta and does not yet offer a stable\n\u003e Public API. However, many users are already successfully using it in\n\u003e production environments. Check [Adopters](#adopters) to see who's already\n\u003e using it.\n\n# Contributing\n\nThis ruleset is primarily funded to support [Google's `distroless` container\nimages]. We may not work on feature requests that do not support this mission.\n\nWe will however accept fully tested contributions via pull requests if they\nalign with the project goals (e.g. add support for a different compression\nformat) and may reject requests that do not (e.g. supporting other packaging\nformats other than `.deb`).\n\n\u003e [!TIP]\n\u003e There's limited maintainer time for this project, so we strongly encourage\n\u003e focused, small, and readable Pull Requests.\n\n# Usage\n\n## Bzlmod (Bazel 6+)\n\n\u003e [!NOTE]\n\u003e If you are using Bazel 6 you need to enable Bzlmod by adding\n\u003e `common --enable_bzlmod` to `.bazelrc` If you are using Bazel 7+\n\u003e [it's enabled by default].\n\nAdd the following to your `MODULE.bazel` file:\n\n```starlark\nbazel_dep(name = \"rules_distroless\", version = \"0.5.1\")\n```\n\nYou can find the latest release version in the [Bazel Central Registry].\n\nIf you want to use a specific commit (e.g. there are commits in `main` that are\nstill not part of a release) you can use one of the few mechanisms that Bazel\nprovides to override repos.\n\nYou can use [`git_override`], [`archive_override`], etc (or\n[`local_path_override`] if you want to test a local patch):\n\n```starlark\nbazel_dep(name = \"rules_distroless\", version = \"0.5.1\")\n\ngit_override(\n    module_name = \"rules_distroless\",\n    remote = \"https://github.com/GoogleContainerTools/rules_distroless.git\",\n    commit = \"a69bc1949d5daf2d1b0906890667d69b0897688b\",\n)\n```\n\n## `WORKSPACE` (legacy)\n\n\u003e [!WARNING]\n\u003e Bzlmod is replacing the legacy `WORKSPACE` system. The `WORKSPACE` file will\n\u003e be disabled by default in Bazel 8 (late 2024) and will be completely removed\n\u003e in Bazel 9 (late 2025). Please migrate to Bzlmod following the steps in the\n\u003e [Bzlmod migration guide].\n\nYou can find the latest release in the [`rules_distroless` Github releases\npage].\n\n# Examples\n\nThe [examples](/examples) demonstrate how to accomplish typical tasks such as\n**create a new user group** or **create a new home directory**:\n\n- [groupadd](/examples/group)\n- [passwd](/examples/passwd)\n- [useradd --home](/examples/home)\n- [update-ca-certificates](/examples/cacerts)\n- [keytool](/examples/java_keystore)\n- [apt-get install](/examples/debian_snapshot) from Debian repositories.\n- [apt-get install](/examples/ubuntu_snapshot) from Ubuntu repositories.\n\nWe also have `distroless`-specific rules that could be useful:\n\n- [flatten](/examples/flatten): flatten multiple `tar` archives.\n- [os_release](/examples/os_release): create an `/etc/os-release` file.\n- [locale](/examples/locale): strip `/usr/lib/locale` to be smaller.\n- [dpkg_statusd](/examples/statusd): creates a `/var/lib/dpkg/status.d`\n  package database for scanners to discover installed packages.\n\n# Public API Docs\n\nTo read more specific documentation for each of the rules in the repo please\ncheck the following docs:\n\n- [apt](/docs/apt.md): repository rule for installing Debian/Ubuntu packages.\n- [apt macro](/docs/apt_macro.md): legacy macro for installing Debian/Ubuntu\n  packages.\n- [rules](/docs/rules.md): various helper rules to aid with creating a Linux /\n  Debian installation from scratch.\n\n# Adopters\n\n- [Google's `distroless` container images]\n- [Arize AI](https://www.arize.com)\n\n\u003e [!TIP]\n\u003e Are you using `rules_distroless`? Please send us a Pull Request to add your\n\u003e project or company name here!\n\n[it's enabled by default]: https://blog.bazel.build/2023/12/11/bazel-7-release.html#bzlmod\n[Bazel Central Registry]: https://registry.bazel.build/modules/rules_distroless\n[`git_override`]: https://bazel.build/versions/6.0.0/rules/lib/globals#git_override\n[`archive_override`]: https://bazel.build/versions/6.0.0/rules/lib/globals#archive_override\n[`local_path_override`]: https://bazel.build/versions/6.0.0/rules/lib/globals#local_path_override\n[Bzlmod migration guide]: https://bazel.build/external/migration\n[`rules_distroless` Github releases page]: https://github.com/GoogleContainerTools/rules_distroless/releases\n[Update on the future stability of source code archives and hashes]: https://github.blog/2023-02-21-update-on-the-future-stability-of-source-code-archives-and-hashes\n[Google's `distroless` container images]: https://github.com/GoogleContainerTools/distroless\n[Arize AI]: https://www.arize.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecontainertools%2Frules_distroless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglecontainertools%2Frules_distroless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecontainertools%2Frules_distroless/lists"}