Skip to content

Instantly share code, notes, and snippets.

@jromero
Created May 18, 2020 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jromero/596ff3bd3c7d7232b17a1c4c01079070 to your computer and use it in GitHub Desktop.
Save jromero/596ff3bd3c7d7232b17a1c4c01079070 to your computer and use it in GitHub Desktop.
buildpacks plugin for docker CLI

Summary

This is a proof-of-concept for integrating Cloud Native Buildpacks into the Docker CLI. The purpose for this is to provide an app developer centric expirience within a common interface.

Going Further

  • Instead of propogating to pack build it would be ideal to have a standalone CLI application that is tailored to this use case which using pack as a library. Doing this would allow for a singular install.
    • Alternatively, pack could provide a command similar to pack completion that would install the docker CLI plugin similar to this PoC.
  • Additional commands such as set-default-builder, inspect-builder, and inspect-image should be supported.
#!/bin/bash
###
# Installation location: $HOME/.docker/cli-plugins/docker-buildpacks
###
if [[ "$1" == "docker-cli-plugin-metadata" ]]; then
cat << EOF
{
"SchemaVersion": "0.1.0",
"Vendor": "buildpacks.io",
"Version": "0.0.1",
"ShortDescription": "Cloud Native Buildpacks"
}
EOF
exit
fi
pack build "${@:2}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment