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.
Asked
Active
Viewed 178 times
1 Answers
4
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!

bacongobbler
- 867
- 6
- 14
-
1It might be possible to modify the builder's systemd unit files to checkout your private repo and bind-mount it per the above instructions. That way it could be fully automated. – gabrtv May 14 '14 at 16:36