clang
Provides the Clang C, C++, and Objective-C compiler frontend based on LLVM for building and analyzing native code in a container environment.
What is clang?
The clang image packages the Clang compiler, part of the LLVM project, for compiling C, C++, and Objective-C source code. Clang is widely used as an alternative to GCC due to its fast compilation times, expressive diagnostics, and tight integration with LLVM's optimization and analysis toolchain. It also powers static analysis tools such as clang-tidy and clang-analyzer.
The containerized image is used in CI/CD pipelines for cross-platform builds, in security toolchains for static analysis, and in development environments where a reproducible, version-pinned compiler is needed without modifying the host system.
How to use this image
Compile a single C file:
Compile a C++ project:
Run clang-tidy for static analysis:
Use in a multi-stage Dockerfile:
Image variants
silkeh/clang:latest
The most recent stable Clang release. Based on Debian. Includes Clang, clang++, clang-tidy, clang-format, and related LLVM tools.
silkeh/clang:<version>
Pinned major version tags such as silkeh/clang:16 or silkeh/clang:17. Use to align the compiler version with your project's toolchain requirements.
.avif)