{"id":49004552,"url":"https://github.com/f-squirrel/dockerized_cpp","last_synced_at":"2026-04-18T19:34:40.427Z","repository":{"id":47201734,"uuid":"404369230","full_name":"f-squirrel/dockerized_cpp","owner":"f-squirrel","description":"Dockerized C/C++ Build Environment","archived":false,"fork":false,"pushed_at":"2023-04-25T17:21:58.000Z","size":18,"stargazers_count":15,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-04-25T18:36:07.400Z","etag":null,"topics":["c","cpp","docker","makefile"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/f-squirrel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-08T14:00:52.000Z","updated_at":"2023-04-25T17:22:03.000Z","dependencies_parsed_at":"2022-08-17T15:26:00.539Z","dependency_job_id":null,"html_url":"https://github.com/f-squirrel/dockerized_cpp","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/f-squirrel/dockerized_cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-squirrel%2Fdockerized_cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-squirrel%2Fdockerized_cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-squirrel%2Fdockerized_cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-squirrel%2Fdockerized_cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f-squirrel","download_url":"https://codeload.github.com/f-squirrel/dockerized_cpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-squirrel%2Fdockerized_cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31982743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c","cpp","docker","makefile"],"created_at":"2026-04-18T19:34:40.292Z","updated_at":"2026-04-18T19:34:40.413Z","avatar_url":"https://github.com/f-squirrel.png","language":"Makefile","readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# Dockerized C/C++ Build Environment\n\nThis repository contains a single highly customizable Makefile helping to build C/C++ projects in a docker container.\n\n## Usage\n\n* Add this repository as a git submodule to your project, for example as directory build_tools:\u003cbr\u003e\n`git submodule add  https://github.com/f-squirrel/dockerized_cpp.git build_tools/`\n* Create a Makefile in the root of your project's source tree\n* Override the variables from the [list](#list-of-variables) in the Makefile\n* Include the Makefile from this repository in your new Makefile: `include build_tools/Makefile`\n\nIn order to see available commands including user-defined ones, run `make help`:\n\n```plain\n$ make help\ngen_cmake                      Generate cmake files, used internally\nbuild                          Build source. In order to build a specific target run: make TARGET=\u003ctarget name\u003e.\ntest                           Run all tests\nclean                          Clean build directory\nlogin                          Login to the container. Note: if the container is already running, login into existing one\nbuild-docker-deps-image        Build the deps image.\n```\n\n## Example\n\nAn example of usage can be found in the repository [\"Dockerized C/C++ Build Example\"](https://github.com/f-squirrel/dockerized_cpp_build_example).\n\n## List of variables\n\n| Variable name                   | Default value               | Description |\n| -------------                   | -------------               | ----------- |\n| `PROJECT_NAME`                  | project                     | Name of the project, by default used in multiple places |\n| `DOCKER_CC`                     | clang                       | C compiler used in the project |\n| `DOCKER_CXX`                    | clang++                     | C++ copmiler used in the project |\n| `DOCKER_DEPS_REPO`              | `${PROJECT_NAME}/`          | Docker repository where the build image is stored |\n| `DOCKER_DEPS_IMAGE`             | `${PROJECT_NAME}_build`     | The name of the build image |\n| `DOCKER_DEPS_VERSION`           | latest | Docker image       version |\n| `DOCKER_DEPS_CONTAINER`         | `${DOCKER_DEPS_IMAGE}`      | The name of build's docker container |\n| `DOCKER_DEPS_FILE`              | DockerfileBuildEnv          | Dockerfile used for building the build image |\n| `DOCKER_DEPS_IMAGE_BUILD_FLAGS` | `--no-cache=true`           | Flags used for building the image, note with this flag on, docker rebuilds from scratch the whole image |\n| `DOCKER_PREPEND_MAKEFILES`      | empty                       | The list of space-separated custom Makefiles to be included before default targets |\n| `DOCKER_APPEND_MAKEFILES`       | empty                       | The list of space-separated ustom Makefiles to be included after default targets |\n| `DOCKER_CMAKE_FLAGS`            | empty                       | Project specific CMake flags |\n| `DOCKER_SHELL`                  | bash                        | Shell used in the container |\n| `LOCAL_SOURCE_PATH`             | Current directory           | The path to the source files |\n| `DOCKER_SOURCE_PATH`            | `/${PROJECT_NAME}`          | Path where source files are mounted in the container |\n| `DOCKER_BUILD_DIR`              | build                       | Cmake build directory |\n| `DOCKER_CTEST_TIMEOUT`          | 5000                        | CMake test timeout |\n| `DOCKER_TEST_CORE_DIR`          | `${DOCKER_BUILD_DIR}/cores` | Path to the core files. For more information on configuring core dumps in docker please refer [here](https://ddanilov.me/how-to-configure-core-dump-in-docker-container) |\n| `DOCKER_ADDITIONAL_RUN_PARAMS`  | empty                       | Additional docker run commands |\n| `DOCKER_BASIC_RUN_PARAMS`       | [link to the code](https://github.com/f-squirrel/dockerized_cpp/blob/master/Makefile#L29) | Default commands used for running the build container |\n| `DOCKER_USER_ROOT`              | `OFF`                       | Runs container as root user |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff-squirrel%2Fdockerized_cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff-squirrel%2Fdockerized_cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff-squirrel%2Fdockerized_cpp/lists"}