## docker (registry)

Push a Docker image to a Docker compatible registry.

### Interface

- Input: **docker.Image**
- Output: **docker.Image**

### Examples

```hcl
build {
  use "docker" {}
  registry {
    use "docker" {
      image = "hashicorp/http-echo"
      tag   = "latest"
    }
  }
}
```

### Required Parameters

These parameters are used in the [`use` stanza](/docs/waypoint-hcl/use) for this plugin.

#### image

The image to push the local image to, fully qualified.

This value must be the fully qualified name to the image. for example: gcr.io/waypoint-demo/demo.

- Type: **string**

#### tag

The tag for the new image.

This is added to image to provide the full image reference.

- Type: **string**

### Optional Parameters

These parameters are used in the [`use` stanza](/docs/waypoint-hcl/use) for this plugin.

#### auth (category)

The authentication information to log into the docker repository.

##### auth.auth

- Type: **string**
- **Optional**

##### auth.email

- Type: **string**
- **Optional**

##### auth.hostname

Hostname of Docker registry.

- Type: **string**
- **Optional**

##### auth.identityToken

Token used to authenticate user.

- Type: **string**
- **Optional**

##### auth.password

Password of Docker registry account.

- Type: **string**
- **Optional**

##### auth.registryToken

Bearer tokens to be sent to Docker registry.

- Type: **string**
- **Optional**

##### auth.serverAddress

Address of Docker registry.

- Type: **string**
- **Optional**

##### auth.username

Username of Docker registry account.

- Type: **string**
- **Optional**

#### encoded_auth

The authentication information to log into the docker repository.

The format of this is base64-encoded JSON. The structure is the [`AuthConfig`](https://pkg.go.dev/github.com/docker/cli/cli/config/types#AuthConfig) structure used by Docker.
WARNING: be very careful to not leak the authentication information by hardcoding it here. Use a helper function like `file()` to read the information from a file not stored in VCS.

- Type: **string**
- **Optional**

#### insecure

Access the registry via http rather than https.

This indicates that the registry should be accessed via http rather than https. Not recommended for production usage.

- Type: **bool**
- **Optional**

#### local

If set, the image will only be tagged locally and not pushed to a remote repository.

- Type: **bool**
- **Optional**

#### password

Password associated with username on the registry.

This optional conflicts with encoded_auth and thusly only one can be used at a time. If both are used, encoded_auth takes precedence.

- Type: **string**
- **Optional**

#### username

Username to authenticate with the registry.

This optional conflicts with encoded_auth and thusly only one can be used at a time. If both are used, encoded_auth takes precedence.

- Type: **string**
- **Optional**

### Output Attributes

Output attributes can be used in your `waypoint.hcl` as [variables](/docs/waypoint-hcl/variables) via [`artifact`](/docs/waypoint-hcl/variables/artifact) or [`deploy`](/docs/waypoint-hcl/variables/deploy).

#### architecture

- Type: **string**

#### image

- Type: **string**

#### location

- Type: **docker.isImage_Location**

#### tag

- Type: **string**
