Skip to content

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.

imageRequired

public DockerImage getImage();

The Docker image where the command will run.


bundlingFileAccessOptional

public BundlingFileAccess getBundlingFileAccess();

The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host.


commandOptional

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']

https://docs.docker.com/engine/reference/run/


entrypointOptional

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


environmentOptional

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.


localOptional

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.


networkOptional

public java.lang.String getNetwork();
  • Type: java.lang.String
  • Default: no networking options

Docker Networking options.


outputTypeOptional

public BundlingOutput getOutputType();

The type of output that this bundling operation is producing.


platformOptional

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.


securityOptOptional

public java.lang.String getSecurityOpt();
  • Type: java.lang.String
  • Default: no security options

Security configuration when running the docker container.


userOptional

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

https://docs.docker.com/engine/reference/run/#user


volumesOptional

public java.util.List<DockerVolume> getVolumes();
  • Type: java.util.List<DockerVolume>
  • Default: no additional volumes are mounted

Additional Docker volumes to mount.


volumesFromOptional

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.

https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container---volumes-from


workingDirectoryOptional

public java.lang.String getWorkingDirectory();
  • Type: java.lang.String
  • Default: /asset-input

Working directory inside the Docker container.