BundlingOptions
Bundling options.
Initializer
import com.aliyun.ros.cdk.core.BundlingOptions;
BundlingOptions.builder()
.image(DockerImage)
// .bundlingFileAccess(BundlingFileAccess)
// .command(java.util.List<java.lang.String>)
// .entrypoint(java.util.List<java.lang.String>)
// .environment(java.util.Map<java.lang.String, java.lang.String>)
// .local(ILocalBundling)
// .network(java.lang.String)
// .outputType(BundlingOutput)
// .platform(java.lang.String)
// .securityOpt(java.lang.String)
// .user(java.lang.String)
// .volumes(java.util.List<DockerVolume>)
// .volumesFrom(java.util.List<java.lang.String>)
// .workingDirectory(java.lang.String)
.build();
Properties
Name | Type | Description |
---|---|---|
image |
DockerImage |
The Docker image where the command will run. |
bundlingFileAccess |
BundlingFileAccess |
The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host. |
command |
java.util.List |
The command to run in the Docker container. |
entrypoint |
java.util.List |
The entrypoint to run in the Docker container. |
environment |
java.util.Map |
The environment variables to pass to the Docker container. |
local |
ILocalBundling |
Local bundling provider. |
network |
java.lang.String |
Docker Networking options. |
outputType |
BundlingOutput |
The type of output that this bundling operation is producing. |
platform |
java.lang.String |
Platform to build for. Requires Docker Buildx. |
securityOpt |
java.lang.String |
Security configuration when running the docker container. |
user |
java.lang.String |
The user to use when running the Docker container. |
volumes |
java.util.List<DockerVolume> |
Additional Docker volumes to mount. |
volumesFrom |
java.util.List |
Where to mount the specified volumes from. |
workingDirectory |
java.lang.String |
Working directory inside the Docker container. |
image
Required
public DockerImage getImage();
- Type: DockerImage
The Docker image where the command will run.
bundlingFileAccess
Optional
public BundlingFileAccess getBundlingFileAccess();
- Type: BundlingFileAccess
- Default: BundlingFileAccess.BIND_MOUNT
The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host.
command
Optional
public java.util.List<java.lang.String> getCommand();
- Type: java.util.List
- Default: run the command defined in the image
The command to run in the Docker container.
Example value: ['npm', 'install']
entrypoint
Optional
public java.util.List<java.lang.String> getEntrypoint();
- Type: java.util.List
- Default: run the entrypoint defined in the image
The entrypoint to run in the Docker container.
Example value: ['/bin/sh', '-c']
https://docs.docker.com/engine/reference/builder/#entrypoint
environment
Optional
public java.util.Map<java.lang.String, java.lang.String> getEnvironment();
- Type: java.util.Map
- Default: no environment variables.
The environment variables to pass to the Docker container.
local
Optional
public ILocalBundling getLocal();
- Type: ILocalBundling
- Default: bundling will only be performed in a Docker container
Local bundling provider.
The provider implements a method tryBundle()
which should return true
if local bundling was performed. If false
is returned, docker bundling
will be done.
network
Optional
public java.lang.String getNetwork();
- Type: java.lang.String
- Default: no networking options
Docker Networking options.
outputType
Optional
public BundlingOutput getOutputType();
- Type: BundlingOutput
- Default: BundlingOutput.AUTO_DISCOVER
The type of output that this bundling operation is producing.
platform
Optional
public java.lang.String getPlatform();
- Type: java.lang.String
- Default: no platform specified (the current machine architecture will be used)
Platform to build for. Requires Docker Buildx.
Specify this property to build images on a specific platform.
securityOpt
Optional
public java.lang.String getSecurityOpt();
- Type: java.lang.String
- Default: no security options
Security configuration when running the docker container.
user
Optional
public java.lang.String getUser();
- Type: java.lang.String
- Default: uid:gid of the current user or 1000:1000 on Windows
The user to use when running the Docker container.
user | user:group | uid | uid:gid | user:gid | uid:group
volumes
Optional
public java.util.List<DockerVolume> getVolumes();
- Type: java.util.List<DockerVolume>
- Default: no additional volumes are mounted
Additional Docker volumes to mount.
volumesFrom
Optional
public java.util.List<java.lang.String> getVolumesFrom();
- Type: java.util.List
- Default: no containers are specified to mount volumes from
Where to mount the specified volumes from.
workingDirectory
Optional
public java.lang.String getWorkingDirectory();
- Type: java.lang.String
- Default: /asset-input
Working directory inside the Docker container.