github.com/aclaygray/packer@v1.3.2/website/source/docs/post-processors/docker-tag.html.md (about)

     1  ---
     2  description: |
     3      The Packer Docker Tag post-processor takes an artifact from the docker builder
     4      that was committed and tags it into a repository. This allows you to use the
     5      other Docker post-processors such as docker-push to push the image to a
     6      registry.
     7  layout: docs
     8  page_title: 'Docker Tag - Post-Processors'
     9  sidebar_current: 'docs-post-processors-docker-tag'
    10  ---
    11  
    12  # Docker Tag Post-Processor
    13  
    14  Type: `docker-tag`
    15  
    16  The Packer Docker Tag post-processor takes an artifact from the [docker
    17  builder](/docs/builders/docker.html) that was committed and tags it into a
    18  repository. This allows you to use the other Docker post-processors such as
    19  [docker-push](/docs/post-processors/docker-push.html) to push the image to a
    20  registry.
    21  
    22  This is very similar to the
    23  [docker-import](/docs/post-processors/docker-import.html) post-processor except
    24  that this works with committed resources, rather than exported.
    25  
    26  ## Configuration
    27  
    28  The configuration for this post-processor requires `repository`, all other settings
    29  are optional.
    30  
    31  -   `repository` (string) - The repository of the image.
    32  
    33  -   `tag` (string) - The tag for the image. By default this is not set.
    34  
    35  -   `force` (boolean) - If true, this post-processor forcibly tag the image even
    36      if tag name is collided. Default to `false`.
    37      But it will be ignored if Docker >= 1.12.0 was detected,
    38      since the `force` option was removed after 1.12.0. [reference](https://docs.docker.com/engine/deprecated/#/f-flag-on-docker-tag)
    39  
    40  ## Example
    41  
    42  An example is shown below, showing only the post-processor configuration:
    43  
    44  ``` json
    45  {
    46    "type": "docker-tag",
    47    "repository": "hashicorp/packer",
    48    "tag": "0.7"
    49  }
    50  ```
    51  
    52  This example would take the image created by the Docker builder and tag it into
    53  the local Docker process with a name of `hashicorp/packer:0.7`.
    54  
    55  Following this, you can use the
    56  [docker-push](/docs/post-processors/docker-push.html) post-processor to push it
    57  to a registry, if you want.