Black Docker image#
Official Black Docker images are available on Docker Hub: https://hub.docker.com/r/pyfound/black
Black images with the following tags are available:
release numbers, e.g.
ℹ Recommended for users who want to use a particular version of Black.
latest_release- tag created when a new version of Black is released.
ℹ Recommended for users who want to use released versions of Black. It maps to the latest release of Black.
latest- tag used for the newest image of Black.
ℹ Recommended for users who always want to use the latest version of Black, even before it is released.
There is one more tag used for Black Docker images -
latest_non_release. It is
created for all unreleased
commits on the
main branch. This tag is
not meant to be used by external users.
A permanent container doesn’t have to be created to use Black as a Docker image. It’s
enough to run Black commands for the chosen image denoted as
:tag. In the below
latest_release tag is used. If
:tag is omitted, the
latest tag will
More about Black usage can be found in Usage and Configuration: The basics.
Check Black version#
$ docker run --rm pyfound/black:latest_release black --version
$ docker run --rm --volume $(pwd):/src --workdir /src pyfound/black:latest_release black --check .