{"id":15870589,"url":"https://github.com/khos2ow/cloudstack-deb-builder","last_synced_at":"2025-07-17T10:39:31.356Z","repository":{"id":44861957,"uuid":"123756631","full_name":"khos2ow/cloudstack-deb-builder","owner":"khos2ow","description":"Docker images for building Apache CloudStack DEB packages","archived":false,"fork":false,"pushed_at":"2021-11-05T17:17:13.000Z","size":45,"stargazers_count":4,"open_issues_count":2,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T17:58:27.096Z","etag":null,"topics":["apache","apache-cloudstack","cloudstack","docker","ubuntu","ubuntu1404","ubuntu1604"],"latest_commit_sha":null,"homepage":"https://khos2ow.github.io/cloudstack-deb-builder/","language":"Shell","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/khos2ow.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}},"created_at":"2018-03-04T04:26:49.000Z","updated_at":"2024-12-29T15:53:14.000Z","dependencies_parsed_at":"2022-09-09T08:50:08.376Z","dependency_job_id":null,"html_url":"https://github.com/khos2ow/cloudstack-deb-builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/khos2ow/cloudstack-deb-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khos2ow%2Fcloudstack-deb-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khos2ow%2Fcloudstack-deb-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khos2ow%2Fcloudstack-deb-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khos2ow%2Fcloudstack-deb-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khos2ow","download_url":"https://codeload.github.com/khos2ow/cloudstack-deb-builder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khos2ow%2Fcloudstack-deb-builder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265596211,"owners_count":23794860,"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":["apache","apache-cloudstack","cloudstack","docker","ubuntu","ubuntu1404","ubuntu1604"],"created_at":"2024-10-06T00:22:25.976Z","updated_at":"2025-07-17T10:39:31.334Z","avatar_url":"https://github.com/khos2ow.png","language":"Shell","readme":"# CloudStack DEB Package builder using Docker\n\n[![Build Status](https://github.com/khos2ow/cloudstack-deb-builder/workflows/ci/badge.svg)](https://github.com/khos2ow/cloudstack-deb-builder/actions)\n[![license](https://img.shields.io/github/license/khos2ow/cloudstack-deb-builder.svg)](https://github.com/khos2ow/cloudstack-deb-builder/blob/master/LICENSE)\n\nDocker images for building Apache CloudStack DEB packages.\n\nThis will give portable, immutable and reproducable mechanism to build packages\nfor releases. A very good candidate to be used by the Jenkins slaves of the project.\n\n## Table of Contents\n\n- [Supported tags and respective `Dockerfile` links](#supported-tags-and-respective-dockerfile-links)\n- [Packges installed in conatiner](#packges-installed-in-conatiner)\n- [Build DEB packages](#build-deb-packages)\n  - [Pull Docker images](#pull-docker-images)\n  - [Build local repository](#build-local-repository)\n    - [Clone Apache CloudStack source code](#clone-apache-cloudstack-source-code)\n    - [Build packages of local repository](#build-packages-of-local-repository)\n  - [Build remote repository](#build-remote-repository)\n    - [Build packages of remote repository](#build-packages-of-remote-repository)\n- [Building tips](#building-tips)\n  - [Maven cache](#maven-cache)\n  - [Adjust host owner permission](#adjust-host-owner-permission)\n- [Builder help](#builder-help)\n- [License](#license)\n\n## Supported tags and respective `Dockerfile` links\n\n- [`latest`, `ubuntu1804` (ubuntu1804/Dockerfile)][latest-dockerfile]\n- [`ubuntu1804-jdk11` (ubuntu1804-jdk11/Dockerfile)][ubuntu1804-jdk11-dockerfile]\n- [`ubuntu1604` (ubuntu1604/Dockerfile)][ubuntu1604-dockerfile]\n- [`ubuntu1404` (ubuntu1404/Dockerfile)][ubuntu1404-dockerfile]\n\n## Packges installed in conatiner\n\nList of available packages inside the container:\n\n- dpkg-dev\n- devscripts\n- debhelper\n- genisoimage\n- lsb-release\n- build-essential\n- git\n- java 1.8\n- maven 3.5.2\n- tomcat\n- python\n- locate\n- which\n\n## Build DEB packages\n\nBuilding DEB packages with the Docker container is rather easy, a few steps are\nrequired:\n\n### Pull Docker images\n\nLet's assume we want to build packages for Ubuntu 16.04 (Xenial). We pull that\nimage first:\n\n```bashe\ndocker pull khos2ow/cloudstack-deb-builder:ubuntu1604\n```\n\nYou can replace `ubuntu1604` tag by `ubuntu1804`, `ubuntu1404` or `latest` if\nyou want.\n\n### Build local repository\n\nYou can clone the CloudStack source code from repository locally on your machine\nand build packages against that.\n\n#### Clone Apache CloudStack source code\n\nThe first step required is to clone the CloudStack source code somewhere on the\nfilesystem, in `/tmp` for example:\n\n```bash\ngit clone https://github.com/apache/cloudstack.git /tmp/cloudstack\n```\n\nNow that you have done so we can continue.\n\n#### Build packages of local repository\n\nNow that we have cloned the CloudStack source code locally, we can build packages\nby mapping `/tmp` into `/mnt/build` in the container. (Note that the container\nalways expects the `cloudstack` code exists in `/mnt/build` path.)\n\n```bash\ndocker run \\\n    -v /tmp:/mnt/build \\\n    khos2ow/cloudstack-deb-builder:ubuntu1604 [ARGS...]\n```\n\nOr if your local cloudstack folder has other name, you need to map it to\n`/mnt/build/cloudstack`.\n\n```bash\ndocker run \\\n    -v /tmp/cloudstack-custom-name:/mnt/build/cloudstack \\\n    khos2ow/cloudstack-deb-builder:ubuntu1604 [ARGS...]\n```\n\nAfter the build has finished the `.deb` packages are available in\n`/tmp/cloudstack/dist/debbuild/DEBS` on the host system.\n\n### Build remote repository\n\nAlso you can build DEB packages of any remote repository without the need to\nmanually clone it first. You only need to specify git remote and git ref you\nintend to build from.\n\n#### Build packages of remote repository\n\nNow let's assume we want to build packages of `HEAD` of `master` branch from\n[https://github.com/apache/cloudstack] repository, we build packages by mapping\n`/tmp` into `/mnt/build` in the container. The container will clone the repository\n(defined by `--git-remote` flag) and check out the REF (defined by `--git-ref` flag)\nin `/mnt/build/cloudstack` inside the container and can be accessed from\n`/tmp/cloudstack` from the host machine.\n\n```bash\ndocker run \\\n    -v /tmp:/mnt/build \\\n    khos2ow/cloudstack-deb-builder:ubuntu1604 \\\n        --git-remote https://github.com/apache/cloudstack.git \\\n        --git-ref master \\\n        [ARGS...]\n```\n\nNote that any valid git Refspec is acceptable, such as:\n\n- `refs/heads/\u003cBRANCH\u003e` to build specified Branch\n- `\u003cBRANCH\u003e` short version of build specified Branch\n- `refs/pull/\u003cNUMBER\u003e/head` to build specified GitHub Pull Request\n- `refs/merge-requests/\u003cNUMBER\u003e/head` to build specified GitLab Merge Request\n- `refs/tags/\u003cNAME\u003e` to build specified Tag\n\nAfter the build has finished the `.deb` packages are available in\n`/tmp/cloudstack/dist/debbuilds/DEBS` on the host system.\n\n## Building tips\n\nCheck the following tips when using the builder:\n\n### Maven cache\n\nYou can provide Maven cache folder (`~/.m2`) as a volume to the container to make\nit run faster.\n\n```bash\ndocker run \\\n    -v /tmp:/mnt/build \\\n    -v ~/.m2:/root/.m2 \\\n    khos2ow/cloudstack-deb-builder:ubuntu1604 [ARGS...]\n```\n\n### Adjust host owner permission\n\nBuilder container in some cases (e.g. using `--use-timestamp` flag) may change\nthe file and directory owner shared from host to container (through volume) and\nit will create `dist` directory which holds the final artifacts. You can provide\n`USER_ID` (mandatory) and/or `USER_GID` (optional) from host to adjust the owner\nfrom whitin the container.\n\nThis is specially useful if you want to use this image in Jenkins job and want\nto clean up the workspace afterward. By adjusting the owner, you won't need to\ngive your Jenkins' user `sudo` privilege to clean up.\n\n```bash\ndocker run \\\n    -v /tmp:/mnt/build \\\n    -e \"USER_ID=$(id -u)\" \\\n    -e \"USER_GID=$(id -g)\" \\\n    khos2ow/cloudstack-deb-builder:ubuntu1604 [ARGS...]\n```\n\n## Builder help\n\nTo see all the available options you can pass to `docker run ...` command:\n\n```bash\ndocker run \\\n    -v /tmp:/mnt/build \\\n    khos2ow/cloudstack-deb-builder:ubuntu1604 --help\n```\n\n## License\n\nLicensed under [Apache License version 2.0]. Please see the [LICENSE] file\nincluded in the root directory of the source tree for extended license details.\n\n[Apache License version 2.0]: http://www.apache.org/licenses/LICENSE-2.0\n[LICENSE]: https://github.com/khos2ow/cloudstack-deb-builder/blob/master/LICENSE\n[latest-dockerfile]: https://github.com/khos2ow/cloudstack-deb-builder/blob/master/ubuntu1804/Dockerfile\n[ubuntu1404-dockerfile]: https://github.com/khos2ow/cloudstack-deb-builder/blob/master/ubuntu1404/Dockerfile\n[ubuntu1604-dockerfile]: https://github.com/khos2ow/cloudstack-deb-builder/blob/master/ubuntu1604/Dockerfile\n[ubuntu1804-jdk11-dockerfile]: https://github.com/khos2ow/cloudstack-deb-builder/blob/master/ubuntu1804-jdk11/Dockerfile\n[https://github.com/apache/cloudstack]: https://github.com/apache/cloudstack\n","funding_links":[],"categories":["Development"],"sub_categories":["Build with Docker"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhos2ow%2Fcloudstack-deb-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhos2ow%2Fcloudstack-deb-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhos2ow%2Fcloudstack-deb-builder/lists"}