Custom a custom Builder image
The default builder image used by Epinio (paketobuildpacks/builder:full) may not work for every application. This could happen if a non-supported programming language is used, or when the application needs to be staged in a very specific way. This page explains how a custom builder image can be built that includes one or more buildpacks. We don't explain how to create a custom buildpack in this guide (upstream docs or with packit).
If you are familiar with the
pack cli you know that
it's possible to add a buildpack to a project using
id = "sample"
version = "0.1"
id = "paketo-community/python"
version = "0.4.2"
Pack can then build the image for the application by running
pack build test/pip -B paketobuildpacks/builder:full.
Solution: Using a Custom Builder
We can create a custom builder that supports Python and tell Epinio to use that for staging.
git clone firstname.lastname@example.org:paketo-buildpacks/full-builder.git
patch -p1 <<EOF
diff --git a/builder.toml b/builder.toml
index f3a35fd..b228671 100644
@@ -32,6 +32,10 @@ description = "Ubuntu bionic base image with buildpacks for Java, .NET Core, Nod
uri = "docker://gcr.io/paketo-buildpacks/php:0.5.0"
version = "0.5.0"
+ uri = "docker://gcr.io/paketo-community/python:0.4.2"
+ version = "0.4.2"
uri = "docker://gcr.io/paketo-buildpacks/procfile:4.2.2"
version = "4.2.2"
@@ -97,6 +101,12 @@ description = "Ubuntu bionic base image with buildpacks for Java, .NET Core, Nod
id = "paketo-buildpacks/java"
version = "5.9.1"
+ id = "paketo-community/python"
+ version = "0.4.2"
pack builder create myorg/epicustombuilder --config builder.toml
Make the image
epicustombuilder:local available to your cluster by pushing it to a container registry.
You can then push your application to Epinio and use your image with the
epinio push -n myapp -p app_directory --builder-image myorg/epicustombuilder:latest
- Project descriptor: https://github.com/buildpacks/spec/blob/main/extensions/project-descriptor.md#projectlicenses
- RFC replace buildpack.yml: https://github.com/paketo-buildpacks/rfcs/blob/main/text/0003-replace-buildpack-yml.md
- RFC environment variable configuration of buildpacks: https://github.com/paketo-buildpacks/rfcs/blob/main/text/0026-environment-variable-configuration-of-buildpacks.md