Build clang-format following the Dockerfile or build the docker file and try it: docker build -t clang-format . docker run -it clang-format # Input your code and end it with Ctrl-D ...