Feature Request: Docker container
Is your feature request related to a problem? Please describe. I'd like to use Darker in our ci/cd, and it would be nice if I didn't have to build the container myself for this.
Describe the solution you'd like a published container
Describe alternatives you've considered Building container myself
Additional context ghcr is good enough
Thanks @jvacek for the feature request!
This is of course an obvious enhancement which would probably be useful to many.
Did you consider using the existing Darker GitHub action as an alternative?
If that doesn't work for you, and if we decide to add a container image, I think I'd prefer not to include any linters in it since linting support is anyway being moved into Graylint and deprecated in Darker. As for the reformatting tools, it probably makes sense to include all supported reformatters, which currently are:
- Black
- isort
- flynt
And if we add support for e.g. pyupgrade (see #51), Ruff (#521) or Blue (#309), we should probably add all of those in the image as well.
@jvacek can you think of a Python package which builds a Docker container in its GitHub actions and uploads it to GHCR, and does this in a clean way following best practices? It would be nice to be able to use that as a reference when adding this to Darker.
Edit: Maybe Black Dockerfile and .github/workflows/docker.yml, although the latter only seems to push to Docker Hub.
I was going to reference the black one as well, I would replicate that as closely as possible; would be nice to be "drop-in-able" on the docker front as well.
"drop-in-able" on the docker front
You mean using a Darker image instead of a Black image and have it interoperate with other tooling?
I'm not sure that the black workflow is such a good example, I found the bake-action much easier to work with.
But in any case, as you can see in the official documentantion, GHCR is only one configuration line away 😄
https://github.com/docker/login-action#github-container-registry
- uses: docker/login-action@v3
with:
registry: ghcr.io
@reneleonhardt could you clarify how bake-action relates to this? I presume you're referring to docker/bake-action?