Closed
Description
Since Platform API 0.3, CNB builders support a creator
lifecycle. This lifecycle executes all other lifecycle phases (detector
, analyzer
, restorer
, builder
, exporter
) in the proper order.
Using the creator
has a few benefits for Spring Boot:
- All lifecycle phases are run in the same container instead of each phase being run in its own container. This has shown to reduce image build time by ~6 seconds.
- Phase orchestration is delegated to the
creator
, insulating Boot from future orchestration changes like phase ordering which has happened between lifecycle versions. - Builder invocation code can be simplified considerably.
Boot could continue to support conditionally running discrete phases to retain compatibility with Platform API 0.2 builders, or only support API 0.3 or greater and only run the single creator
lifecycle. Dropping support for API 0.2 would give the greatest benefit in code simplification.