public class Jib
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DOCKER_DAEMON_IMAGE_PREFIX |
static java.lang.String |
REGISTRY_IMAGE_PREFIX |
static java.lang.String |
TAR_IMAGE_PREFIX |
Modifier and Type | Method and Description |
---|---|
static JibContainerBuilder |
from(DockerClient dockerClient,
DockerDaemonImage dockerDaemonImage)
Starts building the container from a base image stored in the Docker cache.
|
static JibContainerBuilder |
from(DockerDaemonImage dockerDaemonImage)
Starts building the container from a base image stored in the Docker cache.
|
static JibContainerBuilder |
from(ImageReference baseImageReference)
Starts building the container from a base image.
|
static JibContainerBuilder |
from(RegistryImage registryImage)
Starts building the container from a registry base image.
|
static JibContainerBuilder |
from(java.lang.String baseImageReference)
Starts building the container from a base image.
|
static JibContainerBuilder |
from(TarImage tarImage)
Starts building the container from a tarball.
|
static JibContainerBuilder |
fromScratch()
Starts building the container from an empty base image.
|
public static final java.lang.String REGISTRY_IMAGE_PREFIX
public static final java.lang.String DOCKER_DAEMON_IMAGE_PREFIX
public static final java.lang.String TAR_IMAGE_PREFIX
public static JibContainerBuilder from(java.lang.String baseImageReference) throws InvalidImageReferenceException
docker://gcr.io/project/image
. The available prefixes are described
below:
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
baseImageReference
- the base image referenceJibContainerBuilder
to continue building the containerInvalidImageReferenceException
- if the baseImageReference
is not a valid image
referencepublic static JibContainerBuilder from(ImageReference baseImageReference)
from(RegistryImage)
.baseImageReference
- the base image referenceJibContainerBuilder
to continue building the containerpublic static JibContainerBuilder from(RegistryImage registryImage)
registryImage
- the RegistryImage
that defines base container registry and
credentialsJibContainerBuilder
to continue building the containerpublic static JibContainerBuilder from(DockerDaemonImage dockerDaemonImage)
dockerDaemonImage
- the DockerDaemonImage
that defines the base image and Docker
clientJibContainerBuilder
to continue building the containerpublic static JibContainerBuilder from(TarImage tarImage)
tarImage
- the TarImage
that defines the path to the base imageJibContainerBuilder
to continue building the containerpublic static JibContainerBuilder fromScratch()
JibContainerBuilder
to continue building the containerpublic static JibContainerBuilder from(DockerClient dockerClient, DockerDaemonImage dockerDaemonImage)
dockerClient
- the DockerClient
to connectdockerDaemonImage
- the DockerDaemonImage
that defines the base image and Docker
clientJibContainerBuilder
to continue building the container