{"id":18309407,"url":"https://github.com/electrocucaracha/k8s-distroless-demo","last_synced_at":"2025-04-09T11:40:30.218Z","repository":{"id":260540735,"uuid":"881536925","full_name":"electrocucaracha/k8s-Distroless-demo","owner":"electrocucaracha","description":"Distress demo project","archived":false,"fork":false,"pushed_at":"2025-04-04T01:17:18.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T02:24:28.715Z","etag":null,"topics":["distroless","graalvm-native-image","jdeps","jlink","kind","registry"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electrocucaracha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-10-31T19:12:53.000Z","updated_at":"2025-02-05T01:00:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c90a525-b5d6-4776-a25e-3a5fa7153b2c","html_url":"https://github.com/electrocucaracha/k8s-Distroless-demo","commit_stats":null,"previous_names":["electrocucaracha/k8s-distroless-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrocucaracha%2Fk8s-Distroless-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrocucaracha%2Fk8s-Distroless-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrocucaracha%2Fk8s-Distroless-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrocucaracha%2Fk8s-Distroless-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electrocucaracha","download_url":"https://codeload.github.com/electrocucaracha/k8s-Distroless-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248032935,"owners_count":21036697,"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","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":["distroless","graalvm-native-image","jdeps","jlink","kind","registry"],"created_at":"2024-11-05T16:11:20.484Z","updated_at":"2025-04-09T11:40:30.181Z","avatar_url":"https://github.com/electrocucaracha.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Measuring the Benefits of Distroless Containers\n\n\u003c!-- markdown-link-check-disable-next-line --\u003e\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![GitHub Super-Linter](https://github.com/electrocucaracha/k8s-Distroless-demo/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)\n[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)\n\n\u003c!-- markdown-link-check-disable-next-line --\u003e\n\n![visitors](https://visitor-badge.laobi.icu/badge?page_id=electrocucaracha.k8s-Distroless-demo)\n[![Scc Code Badge](https://sloc.xyz/github/electrocucaracha/k8s-Distroless-demo?category=code)](https://github.com/boyter/scc/)\n[![Scc COCOMO Badge](https://sloc.xyz/github/electrocucaracha/k8s-Distroless-demo?category=cocomo)](https://github.com/boyter/scc/)\n\n## Summary\n\nThis demo project highlights the advantages of using Distroless containers by evaluating key metrics such as image size, deployment time, and data transfer efficiency.\n\n### Objectives\n\n- **Image Size Reduction**: Compare the size of a standard container image with a Distroless version.\n- **Deployment Time Improvement**: Measure the deployment time reduction achieved by using Distroless containers.\n- **Data Transfer Efficiency**: Analyze the impact on network usage and costs when deploying to cloud environments.\n\n### Methodology\n\n1. **Initial Setup**: Provision a Kubernetes cluster connected to a private Docker registry and create a standard container image, including build tools and a generic JRE.\n1. **Implementation of Best Practices**: Utilize [Multi-stage builds][1] and [Distroless][2] best practices, along with tools like [jdeps][3] and [jlink][4] fro JRE optimization.\n1. **Measurement**: Record metrics for image size, deployment time, and network usage during deployment to Kubernetes worker nodes.\n\n### Outcomes\n\n- Successfully reduced image size from 863MB to just 22.3MB.\n- Lowered deployment time significantly, from 67.506 seconds to 14.515 seconds.\n- Achieved ~58x reduction in data transfer from the private local registry to the seven Kubernetes worker nodes.\n\nUsing Distroless images can lead to monthly cost savings and minimize traffic congestion.\n\n[1]: https://docs.docker.com/build/building/multi-stage/\n[2]: https://github.com/GoogleContainerTools/distroless\n[3]: https://dev.java/learn/jvm/tools/core/jdeps/\n[4]: https://dev.java/learn/jvm/tools/core/jlink/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectrocucaracha%2Fk8s-distroless-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectrocucaracha%2Fk8s-distroless-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectrocucaracha%2Fk8s-distroless-demo/lists"}