Skip to content

A CNB that allows you to configure your docker image using a project descriptor

Notifications You must be signed in to change notification settings

samj1912/project-descriptor-buildpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Descriptor Buildpack

Version

This is a Cloud Native Buildpack that configures an image using a project descriptor file - project.toml

Usage

This buildpack comprises of the following set of buildpacks. You can find more information and usage guide on the respective READMEs of each of the constituent buildpacks.

Example

For example create a project.toml file with the following content -

# You can set processes and entrypoints
[[io.buildpacks.processes]]
type = "web"
command = "echo"
args = ["hello"]
direct = true

# You can set processes and entrypoints
# which are invoked via a shell and interpolate
# environment variables
[[io.buildpacks.processes]]
type = "another-echo"
command = "echo"
args = ["$MYVAR"]
direct = false
default = false

# You can configure runtime env vars
[[io.buildpacks.run.env]]
name = "test"
value = "test"
behavior = "override"

# You can configure runtime env vars for specific processes
[[io.buildpacks.run.process-env.another-echo]]
name = "MYVAR"
value = "Hello World!"
behavior = "override"

# You can configure labels
[[io.buildpacks.labels]]
key = "label-name"
value = "<label-value>"

Then run -

pack build --buildpack sam/project-descriptor myapp
docker run --entrypoint another-echo myapp
docker inspect myapp --format '{{ index .Config.Labels "label-name" }}'

About

A CNB that allows you to configure your docker image using a project descriptor

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages