github.com/mmcquillan/packer@v1.1.1-0.20171009221028-c85cf0483a5d/website/source/docs/post-processors/docker-push.html.md (about) 1 --- 2 description: | 3 The Packer Docker push post-processor takes an artifact from the docker-import 4 post-processor and pushes it to a Docker registry. 5 layout: docs 6 page_title: 'Docker Push - Post-Processors' 7 sidebar_current: 'docs-post-processors-docker-push' 8 --- 9 10 # Docker Push Post-Processor 11 12 Type: `docker-push` 13 14 The Packer Docker push post-processor takes an artifact from the 15 [docker-import](/docs/post-processors/docker-import.html) post-processor and 16 pushes it to a Docker registry. 17 18 ## Configuration 19 20 This post-processor has only optional configuration: 21 22 - `aws_access_key` (string) - The AWS access key used to communicate with AWS. 23 [Learn how to set this.](/docs/builders/amazon.html#specifying-amazon-credentials) 24 25 - `aws_secret_key` (string) - The AWS secret key used to communicate with AWS. 26 [Learn how to set this.](/docs/builders/amazon.html#specifying-amazon-credentials) 27 28 - `aws_token` (string) - The AWS access token to use. This is different from the 29 access key and secret key. If you're not sure what this is, then you 30 probably don't need it. This will also be read from the `AWS_SESSION_TOKEN` 31 environmental variable. 32 33 - `ecr_login` (boolean) - Defaults to false. If true, the post-processor 34 will login in order to push the image to 35 [Amazon EC2 Container Registry (ECR)](https://aws.amazon.com/ecr/). 36 The post-processor only logs in for the duration of the push. If true 37 `login_server` is required and `login`, `login_username`, and 38 `login_password` will be ignored. 39 40 - `login` (boolean) - Defaults to false. If true, the post-processor will 41 login prior to pushing. For log into ECR see `ecr_login`. 42 43 - `login_email` (string) - The email to use to authenticate to login. 44 45 - `login_username` (string) - The username to use to authenticate to login. 46 47 - `login_password` (string) - The password to use to authenticate to login. 48 49 - `login_server` (string) - The server address to login to. 50 51 Note: When using *Docker Hub* or *Quay* registry servers, `login` must to be 52 set to `true` and `login_email`, `login_username`, **and** `login_password` 53 must to be set to your registry credentials. When using Docker Hub, 54 `login_server` can be omitted. 55 56 -> **Note:** If you login using the credentials above, the post-processor 57 will automatically log you out afterwards (just the server specified). 58 59 ## Example 60 61 For an example of using docker-push, see the section on using generated 62 artifacts from the [docker builder](/docs/builders/docker.html).