docker-autotag/README.md

74 lines
3.3 KiB
Markdown
Raw Normal View History

2020-05-03 21:42:52 +00:00
# docker-autotag
2020-09-22 20:41:00 +00:00
Create docker tags from a given version string
2020-09-06 18:52:16 +00:00
2020-09-21 19:59:13 +00:00
[![Build Status](https://img.shields.io/drone/build/thegeeklab/docker-autotag?logo=drone)](https://cloud.drone.io/thegeeklab/docker-autotag)
[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/docker-autotag)
2020-09-06 18:52:16 +00:00
[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/docker-autotag)
2020-05-03 21:42:52 +00:00
[![Python Version](https://img.shields.io/pypi/pyversions/docker-autotag.svg)](https://pypi.org/project/docker-autotag/)
[![PyPi Status](https://img.shields.io/pypi/status/docker-autotag.svg)](https://pypi.org/project/docker-autotag/)
[![PyPi Release](https://img.shields.io/pypi/v/docker-autotag.svg)](https://pypi.org/project/docker-autotag/)
2020-09-21 19:59:13 +00:00
[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/docker-autotag)](https://github.com/thegeeklab/docker-autotag/graphs/contributors)
[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/docker-autotag)
[![License: MIT](https://img.shields.io/github/license/thegeeklab/docker-autotag)](https://github.com/thegeeklab/docker-autotag/blob/main/LICENSE)
2020-05-03 21:42:52 +00:00
Simple tool to create a list of docker tags from a given version string.
## Environment variables
```Shell
2020-05-04 07:20:37 +00:00
# if not set a comma-separated list will be printed to stdout
2020-05-03 21:42:52 +00:00
DOCKER_AUTOTAG_OUTPUT_FILE=
2020-05-04 07:20:37 +00:00
# adds a given suffix to every determined tag
2020-05-03 21:42:52 +00:00
DOCKER_AUTOTAG_SUFFIX=
2020-05-04 07:20:37 +00:00
# version string to use; returns 'latest' if nothing is specified
2020-05-03 21:42:52 +00:00
DOCKER_AUTOTAG_VERSION=
2020-05-04 07:20:37 +00:00
# comma-seprated list of static tags to add to the result set
2020-05-03 21:42:52 +00:00
DOCKER_AUTOTAG_EXTRA_TAGS=
2020-05-04 07:20:37 +00:00
# 'latest' tag would only be used if determined tag list is empty; adds always 'latest' to the result
2020-05-03 21:42:52 +00:00
DOCKER_AUTOTAG_FORCE_LATEST=False
2020-05-04 07:20:37 +00:00
# if the given version string contains a prerelease, no other tags will be returned
2020-05-03 21:42:52 +00:00
DOCKER_AUTOTAG_IGNORE_PRERELEASE=False
```
2020-05-04 07:20:37 +00:00
## Examples
```Shell
DOCKER_AUTOTAG_VERSION=1.0.1 docker-autotag
# 1.0.1,1.0,1
DOCKER_AUTOTAG_VERSION=0.1.0 docker-autotag
# 0.1.0, 0.1
## 'v' prefixes e.g. from git tags will be removed
DOCKER_AUTOTAG_VERSION=v1.0.1 docker-autotag
# 1.0.1,1.0,1
## unsufficient semver version strings will be tried to convert automatically
## if conversion doesn't work return 'latest'
DOCKER_AUTOTAG_VERSION=1.0 docker-autotag
# 1.0.0,1.0,1
DOCKER_AUTOTAG_VERSION=1.0.0-beta docker-autotag
# 1.0.0-beta
## ignore prerelease to always get a full list of tags
DOCKER_AUTOTAG_IGNORE_PRERELEASE=True DOCKER_AUTOTAG_VERSION=1.0.0-beta docker-autotag
# 1.0.0-beta,1.0.0,1.0,1
DOCKER_AUTOTAG_SUFFIX=amd64 DOCKER_AUTOTAG_VERSION=1.0.0 docker-autotag
# 1.0.0,1.0,1,1.0.0-amd64,1.0-amd64,1-amd64
DOCKER_AUTOTAG_EXTRA_TAGS=extra1,extra2 DOCKER_AUTOTAG_VERSION=1.0.0 docker-autotag
# 1.0.0,1.0,1,extra1,extra2
```
2020-09-21 19:59:13 +00:00
## Contributors
2020-05-03 21:42:52 +00:00
2021-01-03 14:29:09 +00:00
Special thanks goes to all [contributors](https://github.com/thegeeklab/docker-autotag/graphs/contributors). If you would like to contribute,
please see the [instructions](https://github.com/thegeeklab/docker-autotag/blob/main/CONTRIBUTING.md).
2020-05-03 21:42:52 +00:00
2020-09-21 19:59:13 +00:00
## License
2020-05-03 21:42:52 +00:00
This project is licensed under the MIT License - see the [LICENSE](https://github.com/thegeeklab/docker-autotag/blob/main/LICENSE) file for details.