github.com/ratanraj/packer@v1.3.2/website/source/docs/commands/build.html.md (about)

     1  ---
     2  description: |
     3      The `packer build` command takes a template and runs all the builds within it
     4      in order to generate a set of artifacts. The various builds specified within a
     5      template are executed in parallel, unless otherwise specified. And the
     6      artifacts that are created will be outputted at the end of the build.
     7  layout: docs
     8  page_title: 'packer build - Commands'
     9  sidebar_current: 'docs-commands-build'
    10  ---
    11  
    12  # `build` Command
    13  
    14  The `packer build` command takes a template and runs all the builds within it in
    15  order to generate a set of artifacts. The various builds specified within a
    16  template are executed in parallel, unless otherwise specified. And the artifacts
    17  that are created will be outputted at the end of the build.
    18  
    19  ## Options
    20  
    21  -   `-color=false` - Disables colorized output. Enabled by default.
    22  
    23  -   `-debug` - Disables parallelization and enables debug mode. Debug mode flags
    24      the builders that they should output debugging information. The exact behavior
    25      of debug mode is left to the builder. In general, builders usually will stop
    26      between each step, waiting for keyboard input before continuing. This will
    27      allow the user to inspect state and so on.
    28  
    29  -   `-except=foo,bar,baz` - Builds all the builds except those with the given
    30      comma-separated names. Build names by default are the names of their builders,
    31      unless a specific `name` attribute is specified within the configuration.
    32  
    33  -   `-force` - Forces a builder to run when artifacts from a previous build
    34      prevent a build from running. The exact behavior of a forced build is left to
    35      the builder. In general, a builder supporting the forced build will remove the
    36      artifacts from the previous build. This will allow the user to repeat a build
    37      without having to manually clean these artifacts beforehand.
    38  
    39  -   `-on-error=cleanup` (default), `-on-error=abort`, `-on-error=ask` - Selects
    40      what to do when the build fails. `cleanup` cleans up after the previous
    41      steps, deleting temporary files and virtual machines. `abort` exits without
    42      any cleanup, which might require the next build to use `-force`. `ask`
    43      presents a prompt and waits for you to decide to clean up, abort, or retry the
    44      failed step.
    45  
    46  -   `-only=foo,bar,baz` - Only build the builds with the given comma-separated
    47      names. Build names by default are the names of their builders, unless a
    48      specific `name` attribute is specified within the configuration.
    49  
    50  -   `-parallel=false` - Disable parallelization of multiple builders (on by
    51      default).
    52  
    53  -   `-timestamp-ui` - Enable prefixing of each ui output with an RFC3339
    54      timestamp.
    55  
    56  -   `-var` - Set a variable in your packer template. This option can be used
    57      multiple times. This is useful for setting version numbers for your build.
    58  
    59  -   `-var-file` - Set template variables from a file.