{"id":22728502,"url":"https://github.com/6arms1leg/c-tools-docker","last_synced_at":"2025-09-08T00:05:53.356Z","repository":{"id":253685463,"uuid":"609695547","full_name":"6arms1leg/c-tools-docker","owner":"6arms1leg","description":"Simple set of Dockerfiles forming a collection of useful C language tools shipped as Docker images based on Alpine Linux with UID/GID handling to support software development, deployment and continuous integration, tailored to the C programming language in a GNU/Linux environment","archived":false,"fork":false,"pushed_at":"2023-03-05T00:45:01.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T00:27:28.391Z","etag":null,"topics":["build","build-process","check","continuous-delivery","continuous-deployment","continuous-integration","docker","documentation","embedded","embedded-systems","product-assurance","quality","quality-assurance","quality-metrics","scripting","test","testing","toochain"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/6arms1leg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-05T00:13:51.000Z","updated_at":"2025-03-02T14:49:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"90505b21-030a-4e54-9c23-0263e2ce530d","html_url":"https://github.com/6arms1leg/c-tools-docker","commit_stats":null,"previous_names":["6arms1leg/c-tools-docker"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/6arms1leg/c-tools-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6arms1leg%2Fc-tools-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6arms1leg%2Fc-tools-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6arms1leg%2Fc-tools-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6arms1leg%2Fc-tools-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/6arms1leg","download_url":"https://codeload.github.com/6arms1leg/c-tools-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6arms1leg%2Fc-tools-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274113090,"owners_count":25224335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","build-process","check","continuous-delivery","continuous-deployment","continuous-integration","docker","documentation","embedded","embedded-systems","product-assurance","quality","quality-assurance","quality-metrics","scripting","test","testing","toochain"],"created_at":"2024-12-10T17:16:22.781Z","updated_at":"2025-09-08T00:05:53.328Z","avatar_url":"https://github.com/6arms1leg.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nKeywords:\nbuild, build-process, check, continuous-delivery, continuous-deployment,\ncontinuous-integration, docker, documentation, embedded, embedded-systems,\nproduct-assurance, quality-assurance, quality-metrics, quality, scripting,\ntest, testing, toochain\n--\u003e\n\n# C-Tools (Docker) - Simple C language tools collection\n\nThis set of Dockerfiles provides a simple\n\n*collection of useful C language tools shipped as Docker images*\n\nbased on Alpine Linux with UID/GID handling to support software development,\ndeployment and continuous integration, tailored to the C programming language\nin a GNU/Linux environment.\n\nThe collection comprises:\n\n* Build\n    * GCC - Compile C language code with GCC\n    * GCC-AVR - Compile C language code with GCC for AVR targets\n* Check\n    * CLOC - Count lines of code with CLOC\n    * Cppcheck - Analyze code statically with Cppcheck\n    * Lizard - Analyze code complexity with Lizard\n* Doc\n    * Doxygen - Generate documentation from source code with Doxygen\n    * Pandoc - Convert documentation markup formats with Pandoc\n    * UMLet - Convert UMLet UML diagrams into common digital image formats\n* Generic: Python - Execute arbitrary genral purpose scripts with Python\n* Test: Ceedling - Unit test C programs with Ceedling/Unity/CMock/CExeption\n\n## Requirements specification\n\nThe following loosely lists requirements, constraints, features and goals.\n\n* Collection of useful C language tools shipped as Docker images that supports\n  software development, deployment and continuous integration in a GNU/Linux\n  environment\n* Based on Alpine Linux\n* Docker containers run with local non-root user\n* Proper UID/GID handling (mapped to host user)\n* Individual highly focused Docker images that build, check, document, test and\n  run arbitrary scripts in software project repositories\n* Run main (\"payload\") software as default Docker image entry point\n* Run main (\"payload\") software help screen as default Docker image command (if\n  available)\n\n\u003c!-- Separator --\u003e\n\n* Microservice design\n* (Very) Suitable for embedded systems\n* Tailored to the C (and assembly) programming language\n\n\u003c!-- Separator --\u003e\n\n* Low impact on technical budgets: Small storage and memory footprint\n* Quality model\n    * \"Simple\" (low complexity, essential features only)\n    * Modular\n    * Re-usable\n    * Portable (between GNU/Linux distributions)\n    * Scalable from simple and small to complex and large projects\n    * Extensible (to other programming languages)\n    * Version pinning for key software packages\n    * SCM via Git with [Semantic Versioning](https://semver.org)\n* Well documented (from requirements over key features to usage), using\n  Markdown\n\n## How to deploy\n\n\u003e Used variables in this documentation:\n\u003e\n\u003e * `BUILD_TYPE` - Identifier for the individual Docker images.\n\u003e   Run `make help` to list all available build types.\n\u003e * `DOCKER_IMG_NAME` - Name of the Docker image\n\u003e * `DOCKER_IMG_VER` - Version of the Docker image\n\u003e * `CATEGORY` - Sub-directories under `src/` that group the Docker images into\n\u003e   different categories\n\u003e * `TARGET_REPO` - Path to the target project directory\n\u003e * `MIRSA_C_2012_RULES_TEXT` - Path to the (optional) MISRA C:2012 rule texts\n\u003e   text file\n\nThis project comes with a GNU Make build process for easy deployment.\nFirst, run:\n\n```sh\n$ make # Or `make help`\n```\n\nThis lists available Make targets and build type variation points (that might\nbe required by some targets).\n\n### Build\n\nTo build all Docker images, run:\n\n```sh\n$ make c-tools-all\n```\n\nTo build individual Docker images only, run:\n\n```sh\n$ make c-tools t=${BUILD_TYPE}\n```\n\n\u003e Run `make help` or just `make` to list available build types.\n\nTo manually build individual Docker images only, run:\n\n```sh\n$ sudo docker build \\\n    -t ${DOCKER_IMG_NAME}:${DOCKER_IMG_VER} \\\n    -t ${DOCKER_IMG_NAME}:latest \\\n    -f src/${CATEGORY}/${DOCKER_IMG_NAME}/Dockerfile\n```\n\n### Run\n\nTo execute a C tool, run the respective Docker container in the target software\nrepository:\n\n```sh\n$ cd ${TARGET_REPO}\n$ sudo docker run \\\n    --rm \\\n    -v $(pwd):/project/ \\\n    -u $(id -u):$(id -g) \\\n    -it \\\n    --name ${DOCKER_IMG_NAME} \\\n    ${DOCKER_IMG_NAME}:latest\n```\n\n\u003e Add the `--userns=host` option if user namespace isolation is used.\n\nThis runs the main (\"payload\") software with the \"help\" option (if available)\nand no other command line interface arguments.\n\n* To provide actual command line interface aguments (instead of the \"help\"\n  option default), append them to the command above.\n* To run the Docker container interactively without automatically executing the\n  main (\"payload\") software, append `--entrypoint ash` (directly after `-it`)\n  in the command above.\n* To run the Docker container with a GNU Make target, append `--entrypoint make`\n  (directly after `-it`) and the target (at the end) in the command above.\n\nFor ease of use, it is recommended to create shell aliases for the command\nabove for each Docker image.\nFor example, add this to the alias file (BASH/ZSH):\n\n```sh\n# C-Tools (Docker) aliases\nalias ${DOCKER_IMG_NAME}-docker='sudo docker run --rm -v $(pwd):/project/ -u $(id -u):$(id -g) -it --name ${DOCKER_IMG_NAME} ${DOCKER_IMG_NAME}:latest'\nalias ${DOCKER_IMG_NAME}-docker-make='sudo docker run --rm -v $(pwd):/project/ -u $(id -u):$(id -g) -it --entrypoint make --name ${DOCKER_IMG_NAME} ${DOCKER_IMG_NAME}:latest'\n```\n\n### Query version information from inside Docker container\n\nTo query the Docker image version information, run the following from inside\nthe Docker container:\n\n```sh\n$ echo $DOCKER_IMG_VER\n```\n\n\u003e See the \"Run\" section for how to execute a command within a Docker container.\n\n### Extra steps for individual Docker images\n\nSome Docker containers require extra steps to perform their services.\n\n#### Cppcheck\n\nTo invoke Cppcheck’s MISRA C:2012 checker (after generating `*.dump` files),\nrun:\n\n```sh\n$ cppcheck-misra *.dump\n```\n\n\u003e Optionally, place the MISRA C:2012 rules text file within the project\n\u003e directory (or bind-mount somewhere extra) and add the\n\u003e `--rule-texts=${MIRSA_C_2012_RULES_TEXT}` flag.\n\n#### UMLet\n\nThe UMLet Docker image is designed for command line interface batch conversion\nof existing UMLet UML diagrams into common digital image formats--not for\ncreating new diagrams.\n\n##### Run\n\nTo batch-convert UMLet files in the current directory, run either:\n\n```sh\n$ umlet -action=convert -format=png -filename=*.uxf # Full command\n$ umlet-conv png \"*.uxf\" # Shortcut; quote or escape (`\\*`) filepath glob necessary so glob expansion only happens inside wrapper script\n```\n\n##### Fonts configuration\n\nTo make sure the converted UMLet UML diagrams look exactly the same as the\ngraphical representation of the sources, the fonts must be metric-compatible.\nTherefore, FreeSerif, FreeSans and FreeMono from GNU FreeFont must be used (or\nanother metric-compatible font).\nInstall the \"GNU FreeFont\" package for your GNU/Linux distribution and copy\n`fonts.conf` (see UMLet Dockerfile build context) into your GNU/Linux\ndistribution’s fontconfig path.\n\n## Architecture\n\nThe Docker images/files are divided into typical build process and continuous\nintegration pipeline \"stages\", coarsely guiding the development workflow of\n\"build -\u003e test -\u003e check -\u003e document\", plus one additional \"generic\" stage for\ngeneral purpose scripting.\n\n## Coding standard - style conventions\n\nThe style is only loosely defined:\n\nNew added code should use the same style (i.e. \"look similar\") as the already\nexisting code base.\n\n## Workflow\n\nThis project uses a simple topic branch Git workflow.\nThe only permanently existing branches are \"develop\" (development status;\nunstable) and \"master\" (release status; stable).\nNew development efforts are done in separate topic branches, which are then\nmerged into \"develop\" once ready.\nFor releases, the \"develop\" branch is then merged into \"master\" and tagged.\nFast-forward merges are preferred, if possible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F6arms1leg%2Fc-tools-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F6arms1leg%2Fc-tools-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F6arms1leg%2Fc-tools-docker/lists"}