# @heysailor/semantic-release-docker

> semantic-release plugins to use semantic versioning with docker images

Latest version **1.0.0-semantically-released** (published 2018-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @heysailor/semantic-release-docker
pnpm add @heysailor/semantic-release-docker
yarn add @heysailor/semantic-release-docker
bun add @heysailor/semantic-release-docker
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-semantically-released |
| Published | 2018-06-05 |
| First published | 2018-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 153.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Christoph Murczek |
| Maintainers | heysailor |
| Keywords | semantic-release, docker, semver |

## Links

- npm: https://www.npmjs.com/package/@heysailor/semantic-release-docker
- Repository: https://github.com/heysailor/semantic-release-docker
- Homepage: https://github.com/heysailor/semantic-release-docker#readme
- Issues: https://github.com/heysailor/semantic-release-docker/issues
- npm.io page: https://npm.io/package/@heysailor/semantic-release-docker

## Dependencies (1)

- [dockerode](https://npm.io/package/dockerode.md) ^2.5.5

## Recent versions

- 1.0.0-semantically-released (latest) — 2018-06-05

## README

# @iteratec/semantic-release-docker

[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

A [semantic-release](https://github.com/semantic-release/semantic-release) plugin to use semantic versioning for docker images.

## verifyConditions

verifies that environment variables for authentication via username and password are set.
It uses a registry server provided via config or environment variable (preferred) or defaults to docker hub if none is given.
It also verifies that the credentials are correct by logging in to the given registry.

## prepare

tags the specified image with the version number determined by semantic-release and additional tags provided in the configuration.
In addition it supports specifying a complete image name (CIN) via configuration settings according to the canonical format specified by docker:

`[registryhostname[:port]/][username/]imagename[:tag]`

## publish

pushes the tagged images to the registry.

## Configuration

### docker registry authentication

The `docker registry` authentication is **required** and can be set via environment variables.

### Environment variables

| Variable                 | Description                                                                               |
|--------------------------|-------------------------------------------------------------------------------------------|
| DOCKER_REGISTRY_URL      | The hostname and port used by the desired docker registry. Leave blank to use docker hub. |
| DOCKER_REGISTRY_USER     | The user name to authenticate with at the registry.                                       |
| DOCKER_REGISTRY_PASSWORD | The password used for authentication at the registry.                                     |

### Options

| Option         | Description                                                                                |
|----------------|--------------------------------------------------------------------------------------------|
| additionalTags | _Optional_. An array of strings allowing to specify additional tags to apply to the image. |
| imageName      | **_Required_** The name of the image to release.                                           |
| registryUrl    | _Optional_. The hostname and port used by the the registry in format `hostname[:port]`. Omit the port if the registry uses the default port |
| repositoryName | _Optional_. The name of the repository in the registry, e.g. username on docker hub        | 

### Usage

full configuration:
``` json
{
  "verifyConfig": ["@iteratec/semantic-release-docker"],
  "prepare": {
    "path": "@iteratec/semantic-release-docker",
    "additionalTags": ["test", "demo"],
    "imageName": "my-image",
    "registryUrl": "my-private-registry:5678",
    "respositoryName": "my-repository"
  },
  "publish": {
    "path": "@iteratec/semantic-release-docker"
  }
}
```
results in `my-private-registry:5678/my-repository/my-image` with tags `test`, `demo` and the `<semver>` determined by `semantic-release`.

minimum configuration:
``` json
{
  "verifyConfig": ["@iteratec/semantic-release-docker"],
  "prepare": {
    "path": "@iteratec/semantic-release-docker",
    "imageName": "my-image"
  },
  "publish": {
    "path": "@iteratec/semantic-release-docker"
  }
}
```
results in `my-image:<semver>`

---
_Source: https://npm.io/package/@heysailor/semantic-release-docker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
