{"id":20165831,"url":"https://github.com/duffney/containers-from-scratch-cli","last_synced_at":"2025-10-04T16:25:46.837Z","repository":{"id":204482980,"uuid":"711965237","full_name":"duffney/containers-from-scratch-cli","owner":"duffney","description":"A simple Go CLI that builds Linux containers. Based on Liz Rice's https://github.com/lizrice/containers-from-scratch/tree/master","archived":false,"fork":false,"pushed_at":"2023-12-08T15:53:23.000Z","size":58431,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T01:04:04.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/duffney.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-30T14:27:06.000Z","updated_at":"2025-02-10T14:43:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"89908578-04fc-4045-846d-08755ce56340","html_url":"https://github.com/duffney/containers-from-scratch-cli","commit_stats":null,"previous_names":["duffney/containers-from-scratch-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duffney%2Fcontainers-from-scratch-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duffney%2Fcontainers-from-scratch-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duffney%2Fcontainers-from-scratch-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duffney%2Fcontainers-from-scratch-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duffney","download_url":"https://codeload.github.com/duffney/containers-from-scratch-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137891,"owners_count":21053775,"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","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-14T00:39:17.249Z","updated_at":"2025-10-04T16:25:41.762Z","avatar_url":"https://github.com/duffney.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# containers-from-scratch-cli\n\n**Who is this repo for?** If you've written a Dockerfile, built an image, run a container and now want to know what's going on under the hood, this repo is for you! \n\nIn this repo, is a Go CLI that mimic the Docker run and build commands. After building the cli and executing its commands, I encourage you to poke around the code base or watch the livestreams to indulge your curiosity about how containers work. :)\n\nStep 1: Build the containerCLI\n\n```bash\ngo build . -o containercli\n```\n\nStep 2: Run a container with\n\n\nA few notes:\n- Container isolation is achieved by the use of a Linux Kernel feature called Namespaces.\n- Resource constraint is achieved by the use of cgroups.\n\n\n\n\n## What's docker build doing?\n\nDownload Alpine for chroot:\n\n```bash\nmkdir alpine\ncd alpine\ncurl -o alpine.tar.gz http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86_64/alpine-minirootfs-3.10.0-x86_64.tar.gz\ntar xvf alpine.tar.gz\nrm alpine.tar.gz\ntouch ALPINE_CONTAINER_ROOT\n```\n\nDownload Ubuntu for chroot:\n\n```bash\nsudo apt install debootstrap\nsudo debootstrap jammy ./ubuntu-rootfs http://archive.ubuntu.com/ubuntu/\n```\n\nstress mem and cpu\n\n```bash\n./stress --vm 1 --vm-bytes 100M\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduffney%2Fcontainers-from-scratch-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduffney%2Fcontainers-from-scratch-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduffney%2Fcontainers-from-scratch-cli/lists"}