Class DockerConventionJvmApplicationExtension

java.lang.Object
com.bmuschko.gradle.docker.DockerConventionJvmApplicationExtension
Direct Known Subclasses:
DockerJavaApplication, DockerSpringBootApplication

public class DockerConventionJvmApplicationExtension extends Object
The extension for configuring a conventional JVM Docker plugin.
Since:
5.2.0
  • Constructor Details

    • DockerConventionJvmApplicationExtension

      public DockerConventionJvmApplicationExtension(ObjectFactory objectFactory)
  • Method Details

    • getBaseImage

      public final Property<String> getBaseImage()
      The Docker base image used for Java application.

      Defaults to openjdk:11.0.16-jre-slim.

    • getMaintainer

      public final Property<String> getMaintainer()
      The maintainer of the image.

      Defaults to the value of the system property user.name.

    • getUser

      public final Property<String> getUser()
      The username (or UID) and optionally the user group (or GID) to use as the default user and group for the container, e.g. johndoe:30000.

      Defaults to not setting a user. Usually that means running with the root user.

      Since:
      9.3.0
    • getPorts

      public final ListProperty<Integer> getPorts()
      The Docker image exposed ports.

      Defaults to [8080].

    • getImages

      public final SetProperty<String> getImages()
      The images used for the build and push operation e.g. vieux/apache:2.0.

      Defaults to [<project.group>/<applicationName>:<project.version>].

      Since:
      6.0.0
    • getJvmArgs

      public final ListProperty<String> getJvmArgs()
      The JVM arguments used to start the Java program.

      Defaults to [].

      Since:
      4.8.0
    • getMainClassName

      public final Property<String> getMainClassName()
      The main class name to use for starting the application e.g. com.bmuschko.app.Main.

      By default tries to automatically find the main class by scanning the classpath. The value of this property takes precedence and circumvents classpath scanning.

      Since:
      6.1.0
    • getArgs

      public final ListProperty<String> getArgs()
      The program arguments appended to Java application.

      Defaults to [].

      Since:
      9.0.0