@Mojo(name="docker-crac", requiresDependencyResolution=COMPILE_PLUS_RUNTIME) public class DockerCracMojo extends AbstractDockerMojo
Implementation of the docker-crac
packaging.
WARNING: this goal is not intended to be executed directly. Instead, specify the packaging type
using the packaging
property, eg:
mvn package -Dpackaging=docker-crac
This is a two stage process. First a docker image is built that runs the application under a CRaC enabled JDK. Then the application is warmed up via a shell script. And then a checkpoint is taken via a signal using jcmd.
The second stage takes this checkpoint, and creates the final image containing it plus a run script which passes the correct flags to the CRaC enabled JDK.
Modifier and Type | Field and Description |
---|---|
static String |
ARM_ARCH |
static String |
CHECKPOINT_SCRIPT_NAME |
static String |
CRAC_ARCHITECTURE |
static String |
CRAC_CHECKPOINT_NETWORK_PROPERTY |
static String |
CRAC_CHECKPOINT_TIMEOUT_PROPERTY |
static String |
CRAC_JAVA_VERSION |
static String |
CRAC_READINESS_PROPERTY |
static String |
DEFAULT_BASE_IMAGE |
static String |
DEFAULT_CRAC_CHECKPOINT_TIMEOUT |
static String |
DEFAULT_CRAC_JAVA_VERSION |
static String |
DEFAULT_READINESS_COMMAND |
static String |
DOCKER_CRAC_PACKAGING |
static String |
RUN_SCRIPT_NAME |
static String |
WARMUP_SCRIPT_NAME |
static String |
X86_64_ARCH |
appArguments, applicationConfigurationService, baseImageRun, DEFAULT_BASE_IMAGE_GRAALVM_RUN, dockerService, jibConfigurationService, LATEST_TAG, mainClass, mavenProject, micronautRuntime, MOSTLY_STATIC_NATIVE_IMAGE_GRAALVM_FLAG, nativeImageBuildArgs, staticNativeImage
Constructor and Description |
---|
DockerCracMojo(org.apache.maven.project.MavenProject mavenProject,
JibConfigurationService jibConfigurationService,
ApplicationConfigurationService applicationConfigurationService,
DockerService dockerService,
org.apache.maven.shared.filtering.MavenReaderFilter mavenReaderFilter) |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
copyDependencies, getCmd, getFrom, getFromImage, getGraalVmBuildArgs, getPort, getTags, graalVmArch, graalVmJvmVersion, graalVmVersion, javaVersion
public static final String DOCKER_CRAC_PACKAGING
public static final String CHECKPOINT_SCRIPT_NAME
public static final String WARMUP_SCRIPT_NAME
public static final String RUN_SCRIPT_NAME
public static final String DEFAULT_READINESS_COMMAND
public static final String CRAC_READINESS_PROPERTY
public static final String DEFAULT_CRAC_CHECKPOINT_TIMEOUT
public static final String CRAC_CHECKPOINT_NETWORK_PROPERTY
public static final String CRAC_CHECKPOINT_TIMEOUT_PROPERTY
public static final String CRAC_JAVA_VERSION
public static final String DEFAULT_CRAC_JAVA_VERSION
public static final String CRAC_ARCHITECTURE
public static final String DEFAULT_BASE_IMAGE
public static final String ARM_ARCH
public static final String X86_64_ARCH
@Inject public DockerCracMojo(org.apache.maven.project.MavenProject mavenProject, JibConfigurationService jibConfigurationService, ApplicationConfigurationService applicationConfigurationService, DockerService dockerService, org.apache.maven.shared.filtering.MavenReaderFilter mavenReaderFilter)
Copyright © 2020–2023 Micronaut. All rights reserved.