Rebase allows app developers or operators to rapidly update an app image when its stack's run image has changed. By using image layer rebasing, this command avoids the need to fully rebuild the app.
At its core, image rebasing is a simple process. By inspecting an app image,
rebase can determine whether or not a
newer version of the app’s base image exists (either locally or in a registry). If so,
rebase updates the app image’s
layer metadata to reference the newer base image version.
Consider an app image
my-app:my-tag that was originally built using the default builder. That builder’s stack has a
run image called
pack/run. Running the following will update the base of
my-app:my-tag with the latest version of
$ pack rebase my-app:my-tag
pack rebasehas a
--publishflag that can be used to publish the updated app image directly to a registry. Using
--publishis optimal when using a registry in comparison to the docker daemon.