GoogleCloudPlatform / cloud-builders-community

Community-contributed images for Google Cloud Build
https://cloud.google.com/cloud-build/
Apache License 2.0
1.25k stars 851 forks source link

Add `apt` Cloud Builder #649

Closed ymotongpoo closed 6 months ago

ymotongpoo commented 6 months ago

Affected builder image

none (adding new builder)

Expected Behavior

There's an official/community builder to enable building deb package

Actual Behavior

As of today, there are no official or company-maintained (i.e. secure and reliable) docker image that contains all required commands to build apt packages.

In order to build apt packages (i.e. deb), the following commands should be supported by the image:

and the packages required for them are:

However, major public Docker images don't contain them. (In minimum cases, having fakeroot and dpkg-deb is enough, but fakeroot is not included in those images). Such as:

Steps to Reproduce the Problem

  1. try to build deb package

Additional Info

Artifact Registry now supports repositories for apt and rpm packages, and more Cloud Build integration with it are expected. (Currently, only gcloud command supports uploading apt package to the repository, but I hope Cloud Build add features.)

Creating apt and rpm packages in Cloud Build is straightforward steps after creating artifacts such as execution binaries and jar files, and it should makes sense to provide our official builders to support such process, given we have docker builder.

This issue was reported to the official builder repo, but was routed to here.