You are viewing documentation for version 1.22.x. The most current version is 1.26.x.  This documentation is available for 1.26.x.

bootstrap-commands

Settings related to bootstrap commands (settings.bootstrap-commands.*)

Setting list for settings.bootstrap-commands


Full Reference

settings.bootstrap-commands.<name>.commands

List of API commands to be run as part of the bootstrap command. Each API command is expressed as a list of strings.

Also see: 

settings.bootstrap-commands.<name>.essential

If essential is set to true the bootstrap command will halt the boot process when it exits with a non-zero exit code.

Default: false

Accepted values:
  • true
  • false
Also see: 

settings.bootstrap-commands.<name>.mode

Specifies how (or if) a bootstrap command starts at boot. If you set the value to:

  • "always", the bootstrap command will start on every boot,
  • "off", the bootstrap command will not start at boot,
  • "once", the bootstrap command will start on the first boot but after exit, the mode changes to off.

Accepted values:
  • "always"
  • "off"
  • "once"
# Creates a bootstrap command called `mybootstrap`
# It runs everytime the instance boots and if exits with a non-zero code, will halt the boot process
[settings.bootstrap-commands.mybootstrap]
commands = [["apiclient", "ephemeral-storage", "init"], ["apiclient", "ephemeral-storage" ,"bind", "--dirs", "/var/lib/containerd", "/var/lib/docker", "/var/log/ecs"]]
essential = true
mode = "always"
# Creates a bootstrap container called `mybootstrap`
# It runs everytime the instance boots and if exits with a non-zero code, will halt the boot process
apiclient apply <<EOF
[settings.bootstrap-commands.mybootstrap]
commands = [["apiclient", "ephemeral-storage", "init"], ["apiclient", "ephemeral-storage" ,"bind", "--dirs", "/var/lib/containerd", "/var/lib/docker", "/var/log/ecs"]]
essential = true
mode = "always"
EOF
Also see: