Question

To use a custom buildpack, one can set the BUILDPACK_URL env variable. However, this assumes the buildpack is publicly available. Is there a way to use a private buildpack? I can probably use a publicly available buildpack that will run private triggers in the repo, but I am just wondering if there is a way to do something like include the buildpack in the repo itself.

Was it helpful?

Solution

There is a way to inject your own buildpacks into the builder, but it requires that you enter into the deis-builder component. In the builder, we look for a /buildpacks directory here. If it exists, it gets bind-mounted into slugbuilder. Therefore, you can run the following to inject your own buildpack stack for Deis:

$ fleetctl ssh deis-builder.service
$ sudo nsenter -p -u -m -i -n -t $(docker inspect deis-builder | grep Pid | awk '{print $2}' | sed s/,//g)
$ # now we are inside deis-builder!
$ mkdir /buildpacks && cd /buildpacks
$ git clone https://github.com/bacongobbler/heroku-buildpack-jekyll

Note that the list of buildpacks that exist in /buildpacks will be the only ones used, so if you still want heroku-buildpack-python or some other buildpack that is bundled with deis-builder, check out the list at https://github.com/deis/slugbuilder/blob/deis/builder/buildpacks.txt and import them into /buildpacks.

Hope this helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top