Getting started with Pack + Buildpacks
How to use Buildpacks on ChromeOS (Debian Buster).
"A buildpack is something you’ve probably leveraged without knowing, as they’re currently being used in many cloud platforms. A buildpack’s job is to gather everything your app needs to build and run, and it often does this job quickly and quietly. That said, while buildpacks are often a behind-the-scenes detail, they are at the heart of transforming your source code into a runnable app image."
System Requirements
- Docker
- Pack
Buildpacks release
-
Check out the
pack
releases Link -
Set an environment variable to the version required
1VERSION="v0.17.0"
- The environment variable will now be referenced as
$VERSION
Installation
- Install the Pack utility on debian based on environment variable $VERSION (see above)
1(curl -sSL "https://github.com/buildpacks/pack/releases/download/$VERSION/pack-$VERSION-linux.tgz" | sudo tar -C /usr/local/bin/ --no-same-owner -xzv pack)
- Check the version matches the installation expectation
1pack version
- View the available builders
1pack builder suggest
- Set the pack default builder
1pack config default-builder gcr.io/buildpacks/builder
- To build a container do the following
NOTE: Replace IMAGE_NAME
with the name (and Version Tag) to be assigned e.g. my-container:1.0
1pack build [IMAGE_NAME] --builder gcr.io/buildpacks/builder:v1
Your system is now set up to use buildpacks!