简体   繁体   中英

How to turn on layering of build pack generated docker image in Spring Boot, using the the gradle plugin

In this video , Phil Webb describes how to turn on layering of a Spring Boot docker image built by build packs, by adding the layers enabled true configuration for the maven plugin. How do you configure the gradle plugin to do the same ? I can't see any reference to this in the reference manual for the gradle plugin.

It turns out you configure the bootRun task, not the bootBuildImage task, like so:

tasks.bootJar {
  layered()
}

My question ended up being a duplicate of this one

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM