What happened?
What were you attempting to do?
Build an image for a project that is also published as a gem for internal use. TLDR it is a gem that is used by client apps for "kafka interactions" which also bundles some reusable tasks that we run across all of our staging clusters through a Docker image built with CNB buildpacks.
Yes we could write a Dockerfile
instead but it'd be amazing if we could just leverage the same CNB infra we have for other ruby / rails projects we maintain.
What did you expect to happen?
Build should succeed, but we hit a few snags. Also, FWIW I have no idea if other builders like heroku's support this use case, so totally fine if you folks feel like this is not something you wanna move forward with
What was the actual behavior? Please provide log output, if possible.
Some of the "snags" mentioned above include:
- Detect the bundler version to install based on what is present on the
.gemspec
: fixed by setting BP_BUNDLER_VERSION
- Dependency on
git
command on gemspec
Build Configuration
What platform (pack
, kpack
, tekton
buildpacks plugin, etc.) are you using? Please include a version.
We got our own way of building things, including a base image that builds on top of paketo stacks (only using the full
one for real ATM). It relies on the execution of individual steps with lifecycle
CLI as we kinda reimplement the lifecycle creator
with some additional logic that makes sense to us (ex: a custom cache fallback mechanism we use).
The builder is being created by pack
v0.24.0, so it uses whatever lifecycle
release it injects under the hood.
What buildpacks are you using? Please include versions.
Click to see
Inspecting builder: <REDACTED>-builder:full-v0.5.0
REMOTE:
Description: Ubuntu bionic base image with buildpacks for Golang, Ruby and Nodejs
Created By:
Name: Pack CLI
Version: 0.24.0+git-79a40b7.build-3148
Trusted: No
Stack:
ID: io.buildpacks.stacks.bionic
Lifecycle:
Version: 0.13.3
Buildpack APIs:
Deprecated: (none)
Supported: 0.2, 0.3, 0.4, 0.5, 0.6, 0.7
Platform APIs:
Deprecated: (none)
Supported: 0.3, 0.4, 0.5, 0.6, 0.7, 0.8
Run Images:
<REDACTED>-stack-run:bionic-full-f73c656-b638
Buildpacks:
ID NAME VERSION HOMEPAGE
paketo-buildpacks/bundle-install Paketo Bundle Install Buildpack 0.3.1 https://github.com/paketo-buildpacks/bundle-install
paketo-buildpacks/bundler Paketo Bundler Buildpack 0.3.1 https://github.com/paketo-buildpacks/bundler
paketo-buildpacks/ca-certificates Paketo CA Certificates Buildpack 3.0.2 https://github.com/paketo-buildpacks/ca-certificates
paketo-buildpacks/ca-certificates Paketo CA Certificates Buildpack 3.1.0 https://github.com/paketo-buildpacks/ca-certificates
paketo-buildpacks/dep Paketo Dep Buildpack 0.3.0 https://github.com/paketo-buildpacks/dep
paketo-buildpacks/dep-ensure Paketo Dep Ensure Buildpack 0.2.1 https://github.com/paketo-buildpacks/dep-ensure
paketo-buildpacks/environment-variables Paketo Environment Variables Buildpack 4.0.2 https://github.com/paketo-buildpacks/environment-variables
paketo-buildpacks/environment-variables Paketo Environment Variables Buildpack 4.1.0 https://github.com/paketo-buildpacks/environment-variables
paketo-buildpacks/git Paketo Git Buildpack 0.4.1 https://github.com/paketo-buildpacks/git
paketo-buildpacks/go Paketo Go Buildpack 1.0.0 https://github.com/paketo-buildpacks/go
paketo-buildpacks/go-build Paketo Go Build Buildpack 1.0.2 https://github.com/paketo-buildpacks/go-build
paketo-buildpacks/go-dist Paketo Go Distribution Buildpack 1.0.1 https://github.com/paketo-buildpacks/go-dist
paketo-buildpacks/go-mod-vendor Paketo Go Mod Vendor Buildpack 0.5.0 https://github.com/paketo-buildpacks/go-mod-vendor
paketo-buildpacks/image-labels Paketo Image Labels Buildpack 4.0.2 https://github.com/paketo-buildpacks/image-labels
paketo-buildpacks/image-labels Paketo Image Labels Buildpack 4.1.0 https://github.com/paketo-buildpacks/image-labels
paketo-buildpacks/mri Paketo MRI Buildpack 0.6.0 https://github.com/paketo-buildpacks/mri
paketo-buildpacks/node-engine Paketo Node Engine Buildpack 0.11.4 https://github.com/paketo-buildpacks/node-engine
paketo-buildpacks/node-engine Paketo Node Engine Buildpack 0.12.1 https://github.com/paketo-buildpacks/node-engine
paketo-buildpacks/node-module-bom Paketo Node Module Bill of Materials Generator Buildpack 0.2.3 https://github.com/paketo-buildpacks/node-module-bom
paketo-buildpacks/node-run-script Paketo Node Run Script Buildpack 0.3.2 https://github.com/paketo-buildpacks/node-run-script
paketo-buildpacks/node-start Paketo Node Start Buildpack 0.7.1 https://github.com/paketo-buildpacks/node-start
paketo-buildpacks/nodejs Paketo Node.js Buildpack 0.16.0 https://github.com/paketo-buildpacks/nodejs
paketo-buildpacks/npm-install Paketo NPM Install Buildpack 0.8.0 https://github.com/paketo-buildpacks/npm-install
paketo-buildpacks/npm-start Paketo NPM Start Buildpack 0.8.0 https://github.com/paketo-buildpacks/npm-start
paketo-buildpacks/passenger Paketo Passenger Buildpack 0.3.1 https://github.com/paketo-buildpacks/passenger
paketo-buildpacks/procfile Paketo Procfile Buildpack 5.0.2 https://github.com/paketo-buildpacks/procfile
paketo-buildpacks/procfile Paketo Procfile Buildpack 5.1.0 https://github.com/paketo-buildpacks/procfile
paketo-buildpacks/puma Paketo Puma Buildpack 0.2.1 https://github.com/paketo-buildpacks/puma
paketo-buildpacks/rackup Paketo Rackup Buildpack 0.2.1 https://github.com/paketo-buildpacks/rackup
paketo-buildpacks/rails-assets Paketo Rails Assets Buildpack 0.4.1 https://github.com/paketo-buildpacks/rails-assets
paketo-buildpacks/rake Paketo Rake Buildpack 0.2.1 https://github.com/paketo-buildpacks/rake
paketo-buildpacks/ruby Paketo Ruby Buildpack 0.11.0 https://github.com/paketo-buildpacks/ruby
paketo-buildpacks/thin Paketo Thin Buildpack 0.2.1 https://github.com/paketo-buildpacks/thin
paketo-buildpacks/unicorn Paketo Unicorn Buildpack 0.2.1 https://github.com/paketo-buildpacks/unicorn
paketo-buildpacks/watchexec Paketo Watchexec Buildpack 2.3.0 https://github.com/paketo-buildpacks/watchexec
paketo-buildpacks/yarn Paketo Yarn Buildpack 0.5.1 https://github.com/paketo-buildpacks/yarn
paketo-buildpacks/yarn Paketo Yarn Buildpack 0.6.0 https://github.com/paketo-buildpacks/yarn
paketo-buildpacks/yarn-install Paketo Yarn Install Buildpack 0.7.1 https://github.com/paketo-buildpacks/yarn-install
paketo-buildpacks/yarn-install Paketo Yarn Install Buildpack 0.8.0 https://github.com/paketo-buildpacks/yarn-install
paketo-buildpacks/yarn-start Paketo Yarn Start Buildpack 0.7.1 https://github.com/paketo-buildpacks/yarn-start
Detection Order:
├ Group #1:
│ ├ paketo-buildpacks/ruby
│ │ └ Group #1:
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ └ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/ruby
│ │ └ Group #2:
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ └ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/ruby
│ │ └ Group #3:
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ └ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/ruby
│ │ └ Group #4:
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ └ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/ruby
│ │ └ Group #5:
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ └ paketo-buildpacks/[email protected] (optional)
│ └ paketo-buildpacks/ruby
│ └ Group #6:
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected]
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected]
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected] (optional)
│ └ paketo-buildpacks/[email protected] (optional)
├ Group #2:
│ ├ paketo-buildpacks/nodejs
│ │ └ Group #1:
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ └ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/nodejs
│ │ └ Group #2:
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected]
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ ├ paketo-buildpacks/[email protected] (optional)
│ │ └ paketo-buildpacks/[email protected] (optional)
│ └ paketo-buildpacks/nodejs
│ └ Group #3:
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected]
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected]
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected] (optional)
│ └ paketo-buildpacks/[email protected] (optional)
└ Group #3:
├ paketo-buildpacks/go
│ └ Group #1:
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected]
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected]
│ ├ paketo-buildpacks/[email protected]
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected] (optional)
│ └ paketo-buildpacks/[email protected] (optional)
├ paketo-buildpacks/go
│ └ Group #2:
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected]
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected]
│ ├ paketo-buildpacks/[email protected]
│ ├ paketo-buildpacks/[email protected]
│ ├ paketo-buildpacks/[email protected] (optional)
│ ├ paketo-buildpacks/[email protected] (optional)
│ └ paketo-buildpacks/[email protected] (optional)
└ paketo-buildpacks/go
└ Group #3:
├ paketo-buildpacks/[email protected] (optional)
├ paketo-buildpacks/[email protected] (optional)
├ paketo-buildpacks/[email protected] (optional)
├ paketo-buildpacks/[email protected]
├ paketo-buildpacks/[email protected]
├ paketo-buildpacks/[email protected] (optional)
├ paketo-buildpacks/[email protected] (optional)
└ paketo-buildpacks/[email protected] (optional)
LOCAL:
(not present)
Can you provide a sample app or relevant configuration (buildpack.yml
, nginx.conf
, etc.)?
Sure, please see note below, happy to provide more info if you really want to pursue this
Checklist
Note yet, see note below
NOTE: Guidance needed
I'm happy to provide additional information like logs and test cases for you folks to see what we're experiencing but at this stage I'm mostly interested in knowing whether providing better support for apps that have .gemspec
s is something you are interested in pursuing or not 😄
I'd also wonder in which repo I should open the issue, like here, or one of the ruby's "sub-buildpacks"