{"id":19607016,"url":"https://github.com/codemedic/debian-docker-build-tools","last_synced_at":"2025-10-15T17:43:41.161Z","repository":{"id":146670856,"uuid":"57365573","full_name":"codemedic/debian-docker-build-tools","owner":"codemedic","description":"Bash scripts for use in a debian based Dockerfile","archived":false,"fork":false,"pushed_at":"2022-03-31T11:09:46.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-24T19:46:12.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/codemedic.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2016-04-29T07:41:01.000Z","updated_at":"2022-03-31T11:09:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdb40000-0991-4efe-ab17-95e79b84e344","html_url":"https://github.com/codemedic/debian-docker-build-tools","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/codemedic/debian-docker-build-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemedic%2Fdebian-docker-build-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemedic%2Fdebian-docker-build-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemedic%2Fdebian-docker-build-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemedic%2Fdebian-docker-build-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemedic","download_url":"https://codeload.github.com/codemedic/debian-docker-build-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemedic%2Fdebian-docker-build-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279096951,"owners_count":26102697,"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-10-15T02:00:07.814Z","response_time":56,"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-11T10:08:23.041Z","updated_at":"2025-10-15T17:43:41.112Z","avatar_url":"https://github.com/codemedic.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker build tools for debian\n\nBash scripts for use in a debian based Dockerfile.\n\n*NOTE*: Please note that this is a work in progress (proof of concept).\n\n## Why?\n\nWhen working with debian based `Dockerfile`, I often find in a situation where I copy paste the same code over and over. This is a (stop gap) solution to get around that.\n\n## How do I use this?\n\nSince docker does not provide means to do this (for good reasons), you will have to import it into the Dockerfile yourself (using `wget` for example) as shown below.\nThen you need to `source` the `functions.sh` file to import handy functions that will help simplify basic debian package management tasks.\nI have made a few assumptions here\n\n1. Out of the installed packages, you want to keep some and remove the others. The ones that you want to remove are just build dependencies.\n2. One of the `RUN` directives does most of the package management lifting, so that you wouldn't have to repeat the setup of build-tools more than once.\n\n```\nFROM debian:jessie\nENV BUILD_TOOLS_VERSION=1.0.0\nADD https://raw.githubusercontent.com/codemedic/debian-docker-build-tools/${BUILD_TOOLS_VERSION}/functions.sh /tmp/functions.sh\n...\nRUN ( \\\n  . /tmp/functions.sh; \\\n\n  ...\n\n  # choose some runtime dependencies\n  _choose_package pkg1 pkg2; \\\n\n  # choose some build dependencies\n  _choose_package -build-dep pkg3 pkg4; \\\n\n  # install chosen packages and pkg5\n  _install_package pkg5; \\\n\n  ...\n\n  # remove a package (use -now option to remove it now rather than during auto-cleanup)\n  _remove_package pkg1; \\\n\n  # does auto clean-up; set _do_auto_cleanup=false if you do not want this to happen\n  # ... auto cleanup happens here\n)\n\nCMD \"/bin/bash\"\n```\n\n## Contributions\n\nPlease feel free to submit bugs and pull requests; always make sure you log a bug before making changes so that the work can be easily reviewed with appropriate context.\n\n## Coding Standards and Ethics\n\nUse common sense; follow what you see in the file you are modifying. I will be happy to accomodate variations as long as you can reason it, the code is well written and it is maintainable.\n\n## LICENSE\n\nThis code is licensed under MIT license. See [`LICENSE`](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemedic%2Fdebian-docker-build-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemedic%2Fdebian-docker-build-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemedic%2Fdebian-docker-build-tools/lists"}