Offline buildpack for Cloud Foundry

This post is a combination of information available elsewhere (links are included) and can be used to get you’re own offline buildpack on Cloud Foundry.

Prerequisites

install go (https://ahmadawais.com/install-go-lang-on-macos-with-homebrew/)

Dotnet-core buildpack

Instructions on https://github.com/cloudfoundry/dotnet-core-buildpack/tree/v2.0.1

cd ~/workspace
git clone https://github.com/cloudfoundry/dotnet-core-buildpack
cd dotnet-core-buildpack
git checkout v2.0.1 #I'm on v2.0.1, you may need another version
export GOPATH="${HOME}/.go"
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
source .envrc
(cd src/*/vendor/github.com/cloudfoundry/libbuildpack/packager/buildpack-packager && go install)
buildpack-packager --cached
cf create-buildpack offline-dotnet-core dotnet-core_buildpack-cached-v2.0.1.zip 1

Warning! buildpack is 841MB.

Now you can use you’re offline buildpack with the -b parameter:

cf push core -b offline-dotnet-core

About erictummers

Working in a DevOps team is the best thing that happened to me. I like challenges and sharing the solutions with others. On my blog I’ll mostly post about my work, but expect an occasional home project, productivity tip and tooling review.
This entry was posted in Development and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.