You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run pack create-builder my-org/builder -s "my.custom-stack" -b builder.toml Then an image my-org/builder is created using my-org/build as the base image And The following label is added to the builder image io.buildpacks.stack.id=my.custom.stack
It respects the default stack field
Given I have created a ~/.pack/config.toml file with the following contents
When I run pack create-builder my-org/builder -b builder.toml Then an image my-org/builder is created using my-org/build as the base image
Building with a custom stack
Given I have created my-org/builder using my.custom.stack When I run pack build --builder my-org/builder my-org/app Thenmy-org/app image is generated using my-org/run as the base image
It defaults to the run-image with a registry matching the app image
Given I have added new default stack to my config.toml file
Given I have created my-org/builder using my.custom.stack When I run pack build --builder my-org/builder registry2.org/my-org/app Then an app image registry2.org/my-org/app is generated using registry2.org/my-org/run as the base image
Allows custom run-images but errors on stack mismatch
Given I have created my-org/builder using my.custom.stack When I run pack build --builder my-org/builder registry2.org/my-org/app --run-image some-org/bad-run-image Wheresome-org/bad-run-image no io.buildpacks.stack.id label or a io.buildpacks.stack.id label who's value does not match my.custom.stack Then it fails and prints a helpful error message
run-images with correct stack labels are allowed, even if they are not included in the config.toml file
Recording default stacks
Whenever pack build or pack create-builder is run, any new stacks are added to the config.toml if they do not exist already and bionic is set as the default stack if none is specified.
Note
For domain matching look at domain matching in img package
The text was updated successfully, but these errors were encountered:
ekcasey
changed the title
pack create-builder with user provided stack
User provided stacks
Sep 28, 2018
* Stack info is stored in ~/.pack/config.toml
* create-builder takes a --stack flag
* build uses run image for builder's stack
[#33]
Signed-off-by: Dave Goddard <dave@goddard.id.au>
As a buildpack developer I want to create a builder image on top of a custom stack so that I can create builder images specific to my platform
Creating a builder with a custom Stack
It respects the
-s
or--stack
flagGiven I have created a
~/.pack/config.toml
file with the following contentsWhen I run
pack create-builder my-org/builder -s "my.custom-stack" -b builder.toml
Then an image
my-org/builder
is created usingmy-org/build
as the base imageAnd The following label is added to the builder image
io.buildpacks.stack.id=my.custom.stack
It respects the default stack field
Given I have created a
~/.pack/config.toml
file with the following contentsWhen I run
pack create-builder my-org/builder -b builder.toml
Then an image
my-org/builder
is created usingmy-org/build
as the base imageBuilding with a custom stack
Given I have created
my-org/builder
usingmy.custom.stack
When I run
pack build --builder my-org/builder my-org/app
Then
my-org/app
image is generated usingmy-org/run
as the base imageIt defaults to the run-image with a registry matching the app image
Given I have added new default stack to my
config.toml
fileGiven I have created
my-org/builder
usingmy.custom.stack
When I run
pack build --builder my-org/builder registry2.org/my-org/app
Then an app image
registry2.org/my-org/app
is generated usingregistry2.org/my-org/run
as the base imageAllows custom run-images but errors on stack mismatch
Given I have created
my-org/builder
usingmy.custom.stack
When I run
pack build --builder my-org/builder registry2.org/my-org/app --run-image some-org/bad-run-image
Where
some-org/bad-run-image
noio.buildpacks.stack.id
label or aio.buildpacks.stack.id
label who's value does not matchmy.custom.stack
Then it fails and prints a helpful error message
config.toml
fileRecording default stacks
Whenever
pack build
orpack create-builder
is run, any new stacks are added to theconfig.toml
if they do not exist already and bionic is set as the default stack if none is specified.Note
The text was updated successfully, but these errors were encountered: