From d2e24a4ebc9e73b96e1aef6dd15b456c69eeb42d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 4 Sep 2014 21:39:18 -0700 Subject: [PATCH] website: document the new docker post-processors --- .../post-processors/docker-save.html.markdown | 35 ++++++++++++++ .../post-processors/docker-tag.html.markdown | 48 +++++++++++++++++++ website/source/layouts/docs.erb | 2 + 3 files changed, 85 insertions(+) create mode 100644 website/source/docs/post-processors/docker-save.html.markdown create mode 100644 website/source/docs/post-processors/docker-tag.html.markdown diff --git a/website/source/docs/post-processors/docker-save.html.markdown b/website/source/docs/post-processors/docker-save.html.markdown new file mode 100644 index 000000000..88fe3be2c --- /dev/null +++ b/website/source/docs/post-processors/docker-save.html.markdown @@ -0,0 +1,35 @@ +--- +layout: "docs" +page_title: "docker-save Post-Processor" +--- + +# Docker Save Post-Processor + +Type: `docker-save` + +The 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. + +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 is extremely simple. + +* `path` (string) - The path to save the image. + +## Example + +An example is shown below, showing only the post-processor configuration: + +
+{
+  "type": "docker-save",
+  "path": "foo.tar"
+}
+
diff --git a/website/source/docs/post-processors/docker-tag.html.markdown b/website/source/docs/post-processors/docker-tag.html.markdown new file mode 100644 index 000000000..c60aab756 --- /dev/null +++ b/website/source/docs/post-processors/docker-tag.html.markdown @@ -0,0 +1,48 @@ +--- +layout: "docs" +page_title: "docker-tag Post-Processor" +--- + +# Docker Tag Post-Processor + +Type: `docker-tag` + +The Docker Tag post-processor takes an artifact from the +[docker builder](/docs/builders/docker.html) that was committed +and tags it into a repository. This allows you to use the other +Docker post-processors such as +[docker-push](/docs/post-processors/docker-push.html) to push the image +to a registry. + +This is very similar to the [docker-import](/docs/post-processors/docker-import.html) +post-processor except that this works with committed resources, rather +than exported. + +## Configuration + +The configuration for this post-processor is extremely simple. At least +a repository is required. + +* `repository` (string) - The repository of the image. + +* `tag` (string) - The tag for the image. By default this is not + set. + +## Example + +An example is shown below, showing only the post-processor configuration: + +
+{
+  "type": "docker-tag",
+  "repository": "mitchellh/packer",
+  "tag": "0.7"
+}
+
+ +This example would take the image created by the Docker builder +and tag it into the local Docker process with a name of `mitchellh/packer:0.7`. + +Following this, you can use the +[docker-push](/docs/post-processors/docker-push.html) +post-processor to push it to a registry, if you want. diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 08b063cd2..6f646cc95 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -60,6 +60,8 @@
  • Post-Processors

  • docker-import
  • docker-push
  • +
  • docker-save
  • +
  • docker-tag
  • Vagrant
  • Vagrant Cloud
  • vSphere