{"id":18480992,"url":"https://github.com/grupoudea/container-c","last_synced_at":"2025-08-08T08:53:58.902Z","repository":{"id":60038329,"uuid":"540312756","full_name":"grupoudea/container-c","owner":"grupoudea","description":"container created in C ","archived":false,"fork":false,"pushed_at":"2022-09-24T06:17:35.000Z","size":1967,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T19:28:23.711Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grupoudea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-23T06:42:26.000Z","updated_at":"2022-09-23T06:44:23.000Z","dependencies_parsed_at":"2022-09-25T17:20:48.214Z","dependency_job_id":null,"html_url":"https://github.com/grupoudea/container-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/grupoudea/container-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grupoudea%2Fcontainer-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grupoudea%2Fcontainer-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grupoudea%2Fcontainer-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grupoudea%2Fcontainer-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grupoudea","download_url":"https://codeload.github.com/grupoudea/container-c/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grupoudea%2Fcontainer-c/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269393607,"owners_count":24409755,"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-08-08T02:00:09.200Z","response_time":72,"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":[],"created_at":"2024-11-06T12:21:34.490Z","updated_at":"2025-08-08T08:53:58.833Z","avatar_url":"https://github.com/grupoudea.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Container-c\nProgram in c for creating a container that isolate an environment for a child process,\nmaking the right use of limit of resources and owns environment within the host machine\n\nUsing namespaces and cgroups this small container in C simulate what Docker does .\n\n# Bash console inside the program \nThis program create a child process with a sh console , simulating a small OS inside the \ncurrent process , the environment variables , hostname and filesystem are isolate from \nthe father .\n\n# CGroups\nWith cgroups tools the maximum and minimum amount of memory can be \nmodifiable as well as others resources as number of process that child \ncan create . \n\n# How to use it \n- Download the code \n- execute command \"make\" inside the descompresed folder\n- execute \"sudo ./main\" , sudo permissions are needed \n- the main application will be executed and a child process will execute a bash console inside , that container have a small linux distribution called  Alpine Linux, it was used for academic proposes  because is very lightweight , so we can see how a small linux distrution runs inside the container \n\n# Default configurations\n- Does not allow to run more than 20 process \n- Max memory limit 600.000 bytes (~ 0.6 mb)\n\n# References - credits\n- https://cesarvr.io/post/2018-05-22-create-containers/\n- https://github.com/nathanagez/c_container\n- https://devarea.com/simple-container-app-with-namespaces/#.Yy0Dv9LMJhE\n- https://devarea.com/linux-control-groups/#.Yy0LtdLMJhF\n- https://www.grant.pizza/blog/understanding-cgroups/\n- https://docs.kernel.org/admin-guide/cgroup-v1/pids.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrupoudea%2Fcontainer-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrupoudea%2Fcontainer-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrupoudea%2Fcontainer-c/lists"}