Skip to main content

Creates a list of docker tags from a given version string.

Project description

docker-autotag

Create docker tags from a given version string

Build Status Docker Hub Quay.io Python Version PyPi Status PyPi Release GitHub contributors Source: GitHub License: MIT

Simple tool to create a list of docker tags from a given version string.

Environment variables

# if not set a comma-separated list will be printed to stdout
DOCKER_AUTOTAG_OUTPUT_FILE=
# adds a given suffix to every determined tag
DOCKER_AUTOTAG_SUFFIX=
# returns only tags with the applied suffix
DOCKER_AUTOTAG_SUFFIX_STRICT=False
# version string to use; returns 'latest' if nothing is specified
DOCKER_AUTOTAG_VERSION=
# comma-seprated list of static tags to add to the result set
DOCKER_AUTOTAG_EXTRA_TAGS=
# 'latest' tag would only be used if determined tag list is empty; adds always 'latest' to the result
DOCKER_AUTOTAG_FORCE_LATEST=False
# if the given version string contains a prerelease, no other tags will be returned
DOCKER_AUTOTAG_IGNORE_PRERELEASE=False

Examples

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_SUFFIX=amd64 DOCKER_AUTOTAG_SUFFIX_STRICT=True DOCKER_AUTOTAG_VERSION=1.0.0 docker-autotag
# 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

Contributors

Special thanks to all contributors. If you would like to contribute, please see the instructions.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docker_autotag-2.0.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docker_autotag-2.0.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file docker_autotag-2.0.0.tar.gz.

File metadata

  • Download URL: docker_autotag-2.0.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.12.0 Linux/5.15.0-87-generic

File hashes

Hashes for docker_autotag-2.0.0.tar.gz
Algorithm Hash digest
SHA256 25a385a6304560fc91903c602970b1712dc6fa318de198e4b309c0b73047a62a
MD5 fc71863579997f799accec932cdde609
BLAKE2b-256 63270033921193e0894ce7c5f3c0b2663db3e520f7de6c21c58ddcd869f67a81

See more details on using hashes here.

File details

Details for the file docker_autotag-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: docker_autotag-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.12.0 Linux/5.15.0-87-generic

File hashes

Hashes for docker_autotag-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 166d3f94bf6673d018972910b31301128f074b5e22b1617e808c19f7c8d54322
MD5 07bf22c8f9d74bf7a2c4625691134c4f
BLAKE2b-256 21ba4f397302584f5b6690ac079f1620621d5021cecaed5f536524b68ba57259

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page