Skip to content

Instantly share code, notes, and snippets.

@timosalm
Last active March 24, 2020 08:54
Show Gist options
  • Save timosalm/bd4eb7092631cc6495c1f050a772ac7f to your computer and use it in GitHub Desktop.
Save timosalm/bd4eb7092631cc6495c1f050a772ac7f to your computer and use it in GitHub Desktop.
Introduction to pack a local CLI for building apps using Cloud Native Buildpacks

Prerequisites

Installation and usage

  1. Install pack on macOS or see https://buildpacks.io/docs/install-pack/ for alternatives
brew install buildpacks/tap/pack
  1. Clone the sample repository and go to the application directory
git clone git@github.com:buildpacks/samples.git
cd samples/apps/java-maven
  1. Build the application
pack build myapp --builder cloudfoundry/cnb:bionic
  1. Test the application
docker run --rm -p 8080:8080 myapp
  1. Open localhost:8080 in your favorite browser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment