2014-01-19 23:42:42 -05:00
|
|
|
---
|
2015-07-22 22:31:00 -04:00
|
|
|
description: |
|
|
|
|
The Packer Docker push post-processor takes an artifact from the docker-import
|
|
|
|
post-processor and pushes it to a Docker registry.
|
|
|
|
layout: docs
|
|
|
|
page_title: 'Docker Push Post-Processor'
|
|
|
|
...
|
2014-01-19 23:42:42 -05:00
|
|
|
|
|
|
|
# Docker Push Post-Processor
|
|
|
|
|
|
|
|
Type: `docker-push`
|
|
|
|
|
2014-10-20 16:47:30 -04:00
|
|
|
The Packer Docker push post-processor takes an artifact from the
|
2015-07-22 22:31:00 -04:00
|
|
|
[docker-import](/docs/post-processors/docker-import.html) post-processor and
|
|
|
|
pushes it to a Docker registry.
|
2014-01-19 23:42:42 -05:00
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
2014-09-05 17:43:15 -04:00
|
|
|
This post-processor has only optional configuration:
|
|
|
|
|
2016-09-03 10:45:52 -04:00
|
|
|
- `aws_access_key` (string) - The AWS access key used to communicate with AWS.
|
|
|
|
[Learn how to set this.](/docs/builders/amazon.html#specifying-amazon-credentials)
|
|
|
|
|
|
|
|
- `aws_secret_key` (string) - The AWS secret key used to communicate with AWS.
|
|
|
|
[Learn how to set this.](/docs/builders/amazon.html#specifying-amazon-credentials)
|
|
|
|
|
|
|
|
- `aws_token` (string) - The AWS access token to use. This is different from the
|
|
|
|
access key and secret key. If you're not sure what this is, then you
|
|
|
|
probably don't need it. This will also be read from the `AWS_SESSION_TOKEN`
|
|
|
|
environmental variable.
|
|
|
|
|
|
|
|
- `ecr_login` (boolean) - Defaults to false. If true, the post-processor
|
|
|
|
will login in order to push the image to
|
|
|
|
[Amazon EC2 Container Registry (ECR)](https://aws.amazon.com/ecr/).
|
|
|
|
The post-processor only logs in for the duration of the push. If true
|
|
|
|
`login_server` is required and `login`, `login_username`, and
|
|
|
|
`login_password` will be ignored.
|
|
|
|
|
2015-07-22 23:25:58 -04:00
|
|
|
- `login` (boolean) - Defaults to false. If true, the post-processor will
|
2016-09-03 10:45:52 -04:00
|
|
|
login prior to pushing. For log into ECR see `ecr_login`.
|
2014-09-05 17:43:15 -04:00
|
|
|
|
2015-07-22 23:25:58 -04:00
|
|
|
- `login_email` (string) - The email to use to authenticate to login.
|
2014-09-05 17:43:15 -04:00
|
|
|
|
2015-07-22 23:25:58 -04:00
|
|
|
- `login_username` (string) - The username to use to authenticate to login.
|
2014-09-05 17:43:15 -04:00
|
|
|
|
2015-07-22 23:25:58 -04:00
|
|
|
- `login_password` (string) - The password to use to authenticate to login.
|
2014-09-05 17:43:15 -04:00
|
|
|
|
2015-07-22 23:25:58 -04:00
|
|
|
- `login_server` (string) - The server address to login to.
|
2014-01-19 23:42:42 -05:00
|
|
|
|
2016-09-03 10:45:52 -04:00
|
|
|
Note: When using _Docker Hub_ or _Quay_ registry servers, `login` must to be
|
|
|
|
set to `true` and `login_email`, `login_username`, **and** `login_password`
|
|
|
|
must to be set to your registry credentials. When using Docker Hub,
|
2015-12-02 22:06:37 -05:00
|
|
|
`login_server` can be omitted.
|
2015-12-02 21:59:34 -05:00
|
|
|
|
2015-07-22 22:31:00 -04:00
|
|
|
-> **Note:** If you login using the credentials above, the post-processor
|
|
|
|
will automatically log you out afterwards (just the server specified).
|
2014-09-05 17:44:34 -04:00
|
|
|
|
2014-01-19 23:42:42 -05:00
|
|
|
## Example
|
|
|
|
|
2015-07-22 22:31:00 -04:00
|
|
|
For an example of using docker-push, see the section on using generated
|
|
|
|
artifacts from the [docker builder](/docs/builders/docker.html).
|