Docker images use a user install of Black so don't work when running as another user #2975
Labels
C: integrations
Editor plugins and other integrations
C: packaging
Installation and packaging of Black
help wanted
Extra attention is needed
S: accepted
The changes in this design / enhancement issue have been accepted and can be implemented
T: enhancement
New feature or request
Milestone
Describe the bug
Since bd96139, Docker images use a user install of Black. This means they can't be used when running a container as a user other than root.
This is a problem for me because we run Black inside of Jenkins and Jenkins runs all containers with the same UID as the host, meaning that Black cannot run because it isn't on the PATH and in any case
/root/.local/bin/black
is inaccessible. It also seems like it could be problematic in any situation where the Black Docker container needs to write a file, because files it creates must be owned by root.To Reproduce
Previously this would work:
However on versions 21.10b0 and up, including the latest 22.3.0 I get the following output:
Expected behavior
I should be able to run the Black Docker container as any user, not just root.
Environment
The text was updated successfully, but these errors were encountered: