-
Notifications
You must be signed in to change notification settings - Fork 17
/
awscdk_BundlingOptions.go
71 lines (68 loc) · 2.72 KB
/
awscdk_BundlingOptions.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// An experiment to bundle the entire CDK into a single module
package awscdk
// Bundling options.
//
// Example:
// asset := assets.NewAsset(this, jsii.String("BundledAsset"), &assetProps{
// path: path.join(__dirname, jsii.String("markdown-asset")),
// // /asset-input and working directory in the container
// bundling: &bundlingOptions{
// image: awscdk.DockerImage.fromBuild(path.join(__dirname, jsii.String("alpine-markdown"))),
// // Build an image
// command: []*string{
// jsii.String("sh"),
// jsii.String("-c"),
// jsii.String("\n markdown index.md > /asset-output/index.html\n "),
// },
// },
// })
//
// Experimental.
type BundlingOptions struct {
// The Docker image where the command will run.
// Experimental.
Image DockerImage `field:"required" json:"image" yaml:"image"`
// The command to run in the Docker container.
//
// Example value: `['npm', 'install']`.
// See: https://docs.docker.com/engine/reference/run/
//
// Experimental.
Command *[]*string `field:"optional" json:"command" yaml:"command"`
// The entrypoint to run in the Docker container.
//
// Example value: `['/bin/sh', '-c']`.
// See: https://docs.docker.com/engine/reference/builder/#entrypoint
//
// Experimental.
Entrypoint *[]*string `field:"optional" json:"entrypoint" yaml:"entrypoint"`
// The environment variables to pass to the Docker container.
// Experimental.
Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
// 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.
// Experimental.
Local ILocalBundling `field:"optional" json:"local" yaml:"local"`
// The type of output that this bundling operation is producing.
// Experimental.
OutputType BundlingOutput `field:"optional" json:"outputType" yaml:"outputType"`
// [Security configuration](https://docs.docker.com/engine/reference/run/#security-configuration) when running the docker container.
// Experimental.
SecurityOpt *string `field:"optional" json:"securityOpt" yaml:"securityOpt"`
// The user to use when running the Docker container.
//
// user | user:group | uid | uid:gid | user:gid | uid:group.
// See: https://docs.docker.com/engine/reference/run/#user
//
// Experimental.
User *string `field:"optional" json:"user" yaml:"user"`
// Additional Docker volumes to mount.
// Experimental.
Volumes *[]*DockerVolume `field:"optional" json:"volumes" yaml:"volumes"`
// Working directory inside the Docker container.
// Experimental.
WorkingDirectory *string `field:"optional" json:"workingDirectory" yaml:"workingDirectory"`
}