public final class DockerKBean extends KBean
Modifier and Type | Field and Description |
---|---|
java.lang.String |
jvmBaseImage |
java.lang.String |
jvmImageName |
JkDockerBuild.NonRootMode |
jvmNonRootUser |
java.lang.String |
jvmOptions |
java.lang.String |
nativeBaseImage |
java.lang.String |
nativeImageName |
JkDockerBuild.NonRootMode |
nativeNonRootUser |
Constructor and Description |
---|
DockerKBean() |
Modifier and Type | Method and Description |
---|---|
void |
build() |
void |
buildNative() |
static java.lang.String |
computeImageName(JkBuildable buildable)
Computes the name of the Docker image based on the specified project.
|
JkDockerAppTester |
createJvmAppTester(java.util.function.Consumer<java.lang.String> tester)
Creates a
JkDockerAppTester instance configured for testing a JVM-based Docker application. |
JkDockerAppTester |
createNativeAppTester(java.util.function.Consumer<java.lang.String> tester)
Creates a
JkDockerAppTester instance configured for testing a native Docker application. |
void |
customizeJvmImage(java.util.function.Consumer<JkDockerJvmBuild> dockerBuildCustomizer)
Adds a customizer function for customizing the Docker JVM image to build.
|
void |
customizeNativeImage(java.util.function.Consumer<JkDockerNativeBuild> dockerBuildCustomizer)
Adds a customizer function for customizing the Dockerbuild that will generate the Native image.
|
void |
info() |
void |
infoNative() |
java.lang.String |
resolveJvmImageName()
Returns the resolved name of the built JVM image, substituting placeholders and falling back to a
default if no name is explicitly defined.
|
java.lang.String |
resolveNativeImageName()
Returns the resolved name of the built native image, substituting placeholders and falling back to a
default if no name is explicitly defined.
|
cleanOutput, find, getBaseDir, getBaseDirName, getBasePath, getOutputDir, getRunbase, init, load, toString
public java.lang.String jvmImageName
public java.lang.String nativeImageName
public java.lang.String jvmBaseImage
public java.lang.String jvmOptions
public java.lang.String nativeBaseImage
public JkDockerBuild.NonRootMode nativeNonRootUser
public JkDockerBuild.NonRootMode jvmNonRootUser
public void build()
public void info()
public void buildNative()
public void infoNative()
public static java.lang.String computeImageName(JkBuildable buildable)
buildable
- The JkProject ok baseKbean instance containing the module ID, version, and base directory.public void customizeJvmImage(java.util.function.Consumer<JkDockerJvmBuild> dockerBuildCustomizer)
public void customizeNativeImage(java.util.function.Consumer<JkDockerNativeBuild> dockerBuildCustomizer)
public java.lang.String resolveJvmImageName()
public java.lang.String resolveNativeImageName()
public JkDockerAppTester createJvmAppTester(java.util.function.Consumer<java.lang.String> tester)
JkDockerAppTester
instance configured for testing a JVM-based Docker application.tester
- A consumer function that defines the tests to execute against the application,
consuming the base URL and port of the running application.public JkDockerAppTester createNativeAppTester(java.util.function.Consumer<java.lang.String> tester)
JkDockerAppTester
instance configured for testing a native Docker application.tester
- A consumer function that defines the tests to execute against the application,
consuming the base URL and port of the running application.