- All Superinterfaces:
Task<ContainerizeTask.ContainerImage,
ContainerizeTask>
A task for creating container images of the project application.
This task supports the creation of Docker or OCI images packaged as portable TAR archives or directly deployed to a local Docker daemon or to a remote registry.
This task depends on PackageApplicationTask
.
- Since:
- 1.4
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Represents the generated container image.static enum
Describes the format of the image to generate.static enum
Describes where to generate the container image. -
Method Summary
Modifier and TypeMethodDescriptiondockerEnvironment
(Map<String, String> dockerEnvironment) Specifies the Docker environment variables used when executing the Docker CLI executable.dockerExecutable
(Path dockerExecutable) Specifies the path to the Docker CLI executable used to install the image in the Docker daemon.environment
(Map<String, String> environment) Specifies the container's environment variables.executable
(String executable) Specifies the image executable.format
(ContainerizeTask.Format format) Specifies the image format.Specifies the base container image.Specifies the labels to apply to the image.Specifies the ports exposed by the container at runtime defined as:port_number [ "/" udp/tcp ]
.Specifies the image registry where to deploy the image.registryPassword
(String registryPassword) Specifies the password to use to connect to the image registry.registryUsername
(String registryUsername) Specifies the username to use to connect to the image registry.repository
(String repository) Specifies the image repository.target
(ContainerizeTask.Target target) Specifies where to generate the image.Specifies the user and group used to run the container defined as:user / uid [ ":" group / gid ]
.Specifies the container's mount points.Methods inherited from interface io.inverno.tool.buildtools.Task
doOnComplete, execute
-
Method Details
-
target
Specifies where to generate the image.
Defaults to
ContainerizeTask.Target.TAR
.- Parameters:
target
- the image target- Returns:
- the task
-
from
Specifies the base container image.
Defaults to
debian:stable-slim
.- Parameters:
from
- the base container image- Returns:
- the task
-
executable
Specifies the image executable.
Defaults to
Artifact.getName()
.- Parameters:
executable
- the image executable- Returns:
- the task
-
format
Specifies the image format.
Defaults to
ContainerizeTask.Format.OCI
.- Parameters:
format
- the image format.- Returns:
- the task
-
repository
Specifies the image repository.
- Parameters:
repository
- the image repository.- Returns:
- the task
-
registry
Specifies the image registry where to deploy the image.
- Parameters:
registry
- the image registry.- Returns:
- the task
-
registryUsername
Specifies the username to use to connect to the image registry.
- Parameters:
registryUsername
- the registry username- Returns:
- the task
-
registryPassword
Specifies the password to use to connect to the image registry.
- Parameters:
registryPassword
- the registry password- Returns:
- the task
-
dockerExecutable
Specifies the path to the Docker CLI executable used to install the image in the Docker daemon.
- Parameters:
dockerExecutable
- the path to the docker executable- Returns:
- the task
-
dockerEnvironment
Specifies the Docker environment variables used when executing the Docker CLI executable.
- Parameters:
dockerEnvironment
- the docker environment variables- Returns:
- the task
-
labels
Specifies the labels to apply to the image.
- Parameters:
labels
- the image labels- Returns:
- the task
-
ports
Specifies the ports exposed by the container at runtime defined as:
port_number [ "/" udp/tcp ]
.- Parameters:
ports
- the ports to expose- Returns:
- the task
-
volumes
Specifies the container's mount points.
- Parameters:
volumes
- the image volumes- Returns:
- the task
-
user
Specifies the user and group used to run the container defined as:
user / uid [ ":" group / gid ]
.- Parameters:
user
- the user and group used to run the container- Returns:
- the task
-
environment
Specifies the container's environment variables.
- Parameters:
environment
- the container's environment variables- Returns:
- the task
-