mirror of
https://github.com/netdata/netdata.git
synced 2025-04-24 05:13:08 +00:00
Changed Docker image tagging to use semver tags for releases. (#10648)
* Changed Docker image tagging to use semver tags for releases. This allows users to use image names like `netdata/netdata:1` or `netdata/netdata@1.29` and track the most up-to-date release that matches that version prefix. Such usage is a common practice for projects using semantic versioning like we are. This has a side effect, however, of remivng the `v` from the start of our version tags. Not having it is also more consistent with how a vast majority of other projects handle version tags, but users will need to be notified about the change. * Proper backwards compatability. * Add documentation about Docker image tags. * Update packaging/docker/README.md Co-authored-by: Joel Hans <joel.g.hans@gmail.com> Co-authored-by: Joel Hans <joel.g.hans@gmail.com>
This commit is contained in:
parent
7907774e5a
commit
dbed7b51fc
3 changed files with 30 additions and 1 deletions
13
.github/scripts/gen-docker-tags.py
vendored
Executable file
13
.github/scripts/gen-docker-tags.py
vendored
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
|
||||
REPO = 'netdata/netdata'
|
||||
|
||||
version = sys.argv[1].split('.')
|
||||
|
||||
MAJOR = ':'.join([REPO, version[0]])
|
||||
MINOR = ':'.join([REPO, '.'.join(version[0:2])])
|
||||
PATCH = ':'.join([REPO, '.'.join(version[0:3])])
|
||||
|
||||
print(','.join([MAJOR, MINOR, PATCH]))
|
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
|
@ -30,7 +30,7 @@ jobs:
|
|||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.version != 'nightly'
|
||||
run: |
|
||||
echo "publish=true" >> $GITHUB_ENV
|
||||
echo "tags=netdata/netdata:latest,netdata/netdata:stable,netdata/netdata:${{ github.event.inputs.version }}" >> $GITHUB_ENV
|
||||
echo "tags=netdata/netdata:latest,netdata/netdata:stable,$(.github/scripts/gen-docker-tags.py ${{ github.event.inputs.version }})" >> $GITHUB_ENV
|
||||
- name: Determine if we should push changes and which tags to use
|
||||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.version == 'nightly'
|
||||
run: |
|
||||
|
|
|
@ -94,6 +94,22 @@ volumes:
|
|||
netdatacache:
|
||||
```
|
||||
|
||||
## Docker tags
|
||||
|
||||
The official `netdata/netdata` Docker image provides the following named tags:
|
||||
|
||||
* `stable`: The `stable` tag will always point to the most recently published stable build.
|
||||
* `edge`: The `edge` tag will always point ot the most recently published nightly build. In most cases, this is
|
||||
updated daily at around 01:00 UTC.
|
||||
* `latest`: The `latest` tag will always point to the most recently published build, whether it’s a stable build
|
||||
or a nightly build. This is what Docker will use by default if you do not specify a tag.
|
||||
|
||||
Additionally, for each stable release, three tags are pushed, one with the full version of the release (for example,
|
||||
`v1.30.0`), one with just the major and minor version (for example, `v1.30`), and one with just the major version
|
||||
(for example, `v1`). The tags for the minor versions and major versions are updated whenever a release is published
|
||||
that would match that tag (for example, if `v1.30.1` were to be published, the `v1.30` tag would be updated to
|
||||
point to that instead of `v1.30.0`).
|
||||
|
||||
## Health Checks
|
||||
|
||||
Our Docker image provides integrated support for health checks through the standard Docker interfaces.
|
||||
|
|
Loading…
Add table
Reference in a new issue