support for defining docker network opts
This commit is contained in:
@@ -42,18 +42,19 @@ type Config struct {
|
||||
}
|
||||
|
||||
Runner struct {
|
||||
Name string `envconfig:"DRONE_RUNNER_NAME"`
|
||||
Capacity int `envconfig:"DRONE_RUNNER_CAPACITY" default:"2"`
|
||||
Procs int64 `envconfig:"DRONE_RUNNER_MAX_PROCS"`
|
||||
Environ map[string]string `envconfig:"DRONE_RUNNER_ENVIRON"`
|
||||
EnvFile string `envconfig:"DRONE_RUNNER_ENV_FILE"`
|
||||
Secrets map[string]string `envconfig:"DRONE_RUNNER_SECRETS"`
|
||||
Labels map[string]string `envconfig:"DRONE_RUNNER_LABELS"`
|
||||
Volumes map[string]string `envconfig:"DRONE_RUNNER_VOLUMES"`
|
||||
Devices []string `envconfig:"DRONE_RUNNER_DEVICES"`
|
||||
Networks []string `envconfig:"DRONE_RUNNER_NETWORKS"`
|
||||
Privileged []string `envconfig:"DRONE_RUNNER_PRIVILEGED_IMAGES"`
|
||||
Clone string `envconfig:"DRONE_RUNNER_CLONE_IMAGE"`
|
||||
Name string `envconfig:"DRONE_RUNNER_NAME"`
|
||||
Capacity int `envconfig:"DRONE_RUNNER_CAPACITY" default:"2"`
|
||||
Procs int64 `envconfig:"DRONE_RUNNER_MAX_PROCS"`
|
||||
Environ map[string]string `envconfig:"DRONE_RUNNER_ENVIRON"`
|
||||
EnvFile string `envconfig:"DRONE_RUNNER_ENV_FILE"`
|
||||
Secrets map[string]string `envconfig:"DRONE_RUNNER_SECRETS"`
|
||||
Labels map[string]string `envconfig:"DRONE_RUNNER_LABELS"`
|
||||
Volumes map[string]string `envconfig:"DRONE_RUNNER_VOLUMES"`
|
||||
Devices []string `envconfig:"DRONE_RUNNER_DEVICES"`
|
||||
Networks []string `envconfig:"DRONE_RUNNER_NETWORKS"`
|
||||
NetworkOpts map[string]string `envconfig:"DRONE_RUNNER_NETWORK_OPTS"`
|
||||
Privileged []string `envconfig:"DRONE_RUNNER_PRIVILEGED_IMAGES"`
|
||||
Clone string `envconfig:"DRONE_RUNNER_CLONE_IMAGE"`
|
||||
}
|
||||
|
||||
Platform struct {
|
||||
|
||||
@@ -120,10 +120,11 @@ func (c *daemonCommand) run(*kingpin.ParseContext) error {
|
||||
config.Limit.Trusted,
|
||||
),
|
||||
Compiler: &compiler.Compiler{
|
||||
Clone: config.Runner.Clone,
|
||||
Privileged: append(config.Runner.Privileged, compiler.Privileged...),
|
||||
Networks: config.Runner.Networks,
|
||||
Volumes: config.Runner.Volumes,
|
||||
Clone: config.Runner.Clone,
|
||||
Privileged: append(config.Runner.Privileged, compiler.Privileged...),
|
||||
Networks: config.Runner.Networks,
|
||||
NetworkOpts: config.Runner.NetworkOpts,
|
||||
Volumes: config.Runner.Volumes,
|
||||
Resources: compiler.Resources{
|
||||
Memory: config.Resources.Memory,
|
||||
MemorySwap: config.Resources.MemorySwap,
|
||||
|
||||
Reference in New Issue
Block a user