packer-cn/website/source/docs/post-processors/docker-save.html.md

41 lines
1.2 KiB
Markdown
Raw Normal View History

---
2017-06-14 21:04:16 -04:00
description: |
The Packer Docker Save post-processor takes an artifact from the docker
builder that was committed and saves it to a file. This is similar to
exporting the Docker image directly from the builder, except that it preserves
the hierarchy of images and metadata.
2015-07-22 22:31:00 -04:00
layout: docs
2017-06-14 21:04:16 -04:00
page_title: 'Docker Save - Post-Processors'
sidebar_current: 'docs-post-processors-docker-save'
---
# Docker Save Post-Processor
Type: `docker-save`
2015-07-22 22:31:00 -04:00
The Packer Docker Save post-processor takes an artifact from the [docker
builder](/docs/builders/docker.html) that was committed and saves it to a file.
This is similar to exporting the Docker image directly from the builder, except
that it preserves the hierarchy of images and metadata.
2015-07-22 22:31:00 -04:00
We understand the terminology can be a bit confusing, but we've adopted the
terminology from Docker, so if you're familiar with that, then you'll be
familiar with this and vice versa.
## Configuration
The configuration for this post-processor only requires one option.
2017-06-14 21:04:16 -04:00
- `path` (string) - The path to save the image.
## Example
An example is shown below, showing only the post-processor configuration:
2017-06-14 21:04:16 -04:00
``` json
{
"type": "docker-save",
"path": "foo.tar"
}
```