Docker image tagging conventions for a Python CLI project

How do you tag your python docker images? How should I tag my docker images? Are there any standards and/or widely accepted conventions?

I’m aware of latest pointing to the latest stable release. So my question arises with respect to other cases:

  1. What’s the standard tag that points latest git commit? docker-metadata says edge. Although I’ve seen branch name being used for this purpose as well.
  2. What’s the standard tag that points to a specific release? v1.1.1 or 1.1.1

Are there any python specific conventions I need to know?

Why would you need a Docker image for a CLI program in the first place?

What’s the use of a CLI program that can only be used from inside Docker?

The CLI part is hardly relevant here, I mentioned it because that’s what I’m working with it. It’s meant to run on pre existing dockerized servers, does a bunch of network operations, and works just as well via docker run --rm mycliapp [args] as it does locally. But you can essentially boil down my question to “Docker tagging standards for a Python project”.

I don’t know if there are strong conventions for this, but you probably want to include both the project version number and the python version.

One example that does this is dask-docker. They use calendar versioning so the tag 2023.12.1-py3.10 is the version of dask and then the version of python.

1 Like