Adapted from embedded-guidelines.
This repository contains Dockerfiles that can build common CI/CD utilities for C/C++ projects. The utilities are divided in 2 categories:
- Compilers: Compilers, build systems and SDKs for MCUs.
- make
- gcc-arm-none-eabi
- cmake (3.24.0)
- ninja (1.11.0)
- Static analysis: Utilities to perform Static analysis.
- cppcheck (2.8)
- vera++
- RATS (2.4)
- CodeChecker (6.18.2)
- LLVM+Clang (12.0.1)
- Doxygen (1.9.4)
- PVS Studio (7.20)
- PMD (6.48.0)
- Lizard
- cppclean
- metrixplusplus (1.1.7)
- Env. Variables:
CPPCHECK_HTML
Path where the cppcheck html script is installed. Allows to generate html output from cppcheckMETRIXPP_DIR
Metrix-plus-plus directory.CODECHECKER_ACTIVATE
Path where the python env to activate codechecker is installed.PMD_BIN
Path where Pmd is installed.
Note: If no version is given for an utility/SW, it means the latest version is retrieved from the package manager or github.
<This repository >/
├───Common/ - Common Docker files to build the images
│ ├───Compilers.dock - Dockerfile to install the embedded compilers
│ ├───StaticAnalysis.dock - Dockerfile to install the static analysis tools
├───Embedded/ - Dockerfile to build the Embedded Image
└───README.md - this file
By looking at the repository you will notice that there are Dockerfiles with .dock
extension. The reason is two-fold:
- Not all of the tools are always required to be installed for a specific environment. For example if your project is desktop based, you wouldnt need the embedded compilers. This allows to only select the tools that you need to use.
- Better organization. Its easier to organize how the Docker images are built if they are organized based on their purpose.
By default Docker does not have a syntax to include other Dockerfiles. For this reason to include these files you can either manually copy their contents to the Dockerfile you want to build or like in this repository, use the Dockerfile-plus syntax extension. This extension allows to easily include other dockerfiles to your main Dockerfile (see directory Embedded and ROS for examples).To use this extension you need to add the following env. variables before building with docker:
DOCKER_BUILDKIT=1
COMPOSE_DOCKER_CLI_BUILD=1
As mentioned in the last section, the dockerfiles for the installation of the tools are located in the Common
directory. If you need to use any of the tools for a specific project you can manually copy the contents or use the Dockerfile-plus to include them.
This repository builds automatically the following images based on the docker files in the Common
directory.
-
Embedded: Image for embedded projects that includes all of the
.dock
files located in theCommon
dir. The image is hosted in this gitlab repository under the following url:registry.git.fh-aachen.de/embeddedtools/embedded-tools-image:core
The image can also be built from Docker as follows:
export DOCKER_BUILDKIT=1 export COMPOSE_DOCKER_CLI_BUILD=1 docker build -f Embedded/Dockerfile -t embedded-tools-image:core .