Class Jib


  • public class Jib
    extends java.lang.Object
    Build containers with Jib.
    • Field Detail

      • REGISTRY_IMAGE_PREFIX

        public static final java.lang.String REGISTRY_IMAGE_PREFIX
        See Also:
        Constant Field Values
      • DOCKER_DAEMON_IMAGE_PREFIX

        public static final java.lang.String DOCKER_DAEMON_IMAGE_PREFIX
        See Also:
        Constant Field Values
      • TAR_IMAGE_PREFIX

        public static final java.lang.String TAR_IMAGE_PREFIX
        See Also:
        Constant Field Values
    • Method Detail

      • from

        public static JibContainerBuilder from​(java.lang.String baseImageReference)
                                        throws InvalidImageReferenceException
        Starts building the container from a base image. The type of base image can be specified using a prefix, e.g. docker://gcr.io/project/image. The available prefixes are described below:
        • No prefix, or registry://: uses a registry base image
        • docker://: uses a base image found in the local Docker daemon
        • tar://: uses a tarball base image at the path following the prefix
        Parameters:
        baseImageReference - the base image reference
        Returns:
        a new JibContainerBuilder to continue building the container
        Throws:
        InvalidImageReferenceException - if the baseImageReference is not a valid image reference
      • from

        public static JibContainerBuilder from​(ImageReference baseImageReference)
        Starts building the container from a base image. The base image should be publicly-available. For a base image that requires credentials, use from(RegistryImage).
        Parameters:
        baseImageReference - the base image reference
        Returns:
        a new JibContainerBuilder to continue building the container
      • from

        public static JibContainerBuilder from​(DockerDaemonImage dockerDaemonImage)
        Starts building the container from a base image stored in the Docker cache. Requires a running Docker daemon.
        Parameters:
        dockerDaemonImage - the DockerDaemonImage that defines the base image and Docker client
        Returns:
        a new JibContainerBuilder to continue building the container