Skip to content

BundlingOptions

Bundling options.

Initializer

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
&alicloudroscdkcore.BundlingOptions {
    Image: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.DockerImage,
    BundlingFileAccess: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.BundlingFileAccess,
    Command: *[]*string,
    Entrypoint: *[]*string,
    Environment: *map[string]*string,
    Local: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ILocalBundling,
    Network: *string,
    OutputType: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.BundlingOutput,
    Platform: *string,
    SecurityOpt: *string,
    User: *string,
    Volumes: *[]github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.DockerVolume,
    VolumesFrom: *[]*string,
    WorkingDirectory: *string,
}

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 []string The command to run in the Docker container.
Entrypoint []string The entrypoint to run in the Docker container.
Environment map[string]string The environment variables to pass to the Docker container.
Local ILocalBundling Local bundling provider.
Network *string Docker Networking options.
OutputType BundlingOutput The type of output that this bundling operation is producing.
Platform *string Platform to build for. Requires Docker Buildx.
SecurityOpt *string Security configuration when running the docker container.
User *string The user to use when running the Docker container.
Volumes *[]DockerVolume Additional Docker volumes to mount.
VolumesFrom []string Where to mount the specified volumes from.
WorkingDirectory *string Working directory inside the Docker container.

ImageRequired

Image DockerImage

The Docker image where the command will run.


BundlingFileAccessOptional

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.


CommandOptional

Command *[]*string
  • Type: []string
  • 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

Entrypoint *[]*string
  • Type: []string
  • 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

Environment *map[string]*string
  • Type: map[string]string
  • Default: no environment variables.

The environment variables to pass to the Docker container.


LocalOptional

Local ILocalBundling
  • 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

Network *string
  • Type: *string
  • Default: no networking options

Docker Networking options.


OutputTypeOptional

OutputType BundlingOutput

The type of output that this bundling operation is producing.


PlatformOptional

Platform *string
  • Type: *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

SecurityOpt *string
  • Type: *string
  • Default: no security options

Security configuration when running the docker container.


UserOptional

User *string
  • Type: *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

Volumes *[]DockerVolume
  • Type: *[]DockerVolume
  • Default: no additional volumes are mounted

Additional Docker volumes to mount.


VolumesFromOptional

VolumesFrom *[]*string
  • Type: []string
  • 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

WorkingDirectory *string
  • Type: *string
  • Default: /asset-input

Working directory inside the Docker container.