{"id":20744084,"url":"https://github.com/petersonwsantos/virti-docker-centos-build-scripts","last_synced_at":"2026-04-25T09:05:15.963Z","repository":{"id":240908627,"uuid":"99944306","full_name":"petersonwsantos/virti-docker-centos-build-scripts","owner":"petersonwsantos","description":"DOCKER - Build Base Image Script - CentOS","archived":false,"fork":false,"pushed_at":"2017-08-10T18:31:09.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T12:49:51.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/petersonwsantos.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-10T16:37:02.000Z","updated_at":"2017-08-31T13:32:42.000Z","dependencies_parsed_at":"2024-05-21T12:11:53.877Z","dependency_job_id":"f7278740-5f7b-456a-b0f1-ef8ad082a30c","html_url":"https://github.com/petersonwsantos/virti-docker-centos-build-scripts","commit_stats":null,"previous_names":["petersonwsantos/virti-docker-centos-build-scripts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/petersonwsantos/virti-docker-centos-build-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petersonwsantos%2Fvirti-docker-centos-build-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petersonwsantos%2Fvirti-docker-centos-build-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petersonwsantos%2Fvirti-docker-centos-build-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petersonwsantos%2Fvirti-docker-centos-build-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petersonwsantos","download_url":"https://codeload.github.com/petersonwsantos/virti-docker-centos-build-scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petersonwsantos%2Fvirti-docker-centos-build-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32256221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T04:23:17.126Z","status":"ssl_error","status_checked_at":"2026-04-25T04:21:53.360Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-11-17T07:14:14.169Z","updated_at":"2026-04-25T09:05:15.948Z","avatar_url":"https://github.com/petersonwsantos.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"CentOS Docker build scripts\n===========================\n\nThis repository contains the kickstart files needed to build a CentOS Docker container from scratch\n\n## Necessary tools\n\nThe Docker base containers for 6 and 7 are now created with tools included in CentOS itself. \n\nThe following packages and dependencies are needed:\n\n  yum install -y libguestfs-tools-c lorax virt-install libvirt\n  systemctl start  libvirtd\n\n\n## Build\n\nIn order to build the container, a rootfs tarball and Dockerfile are required.\nWe use lorax's livemedia-creator to create the rootfs tarball, but you'll need\na boot.iso start the process. Below you can find a set of example commands\nthat will produce a suitable rootfs tarball. Additionally you can also run the\ncontainerbuild.sh script, which will fetch the iso, create the rootfs, and\ngenerate a Dockerfile for you.\n\n### The hard way\n--\n```bash\n# curl http://mirror.centos.org/centos/7/os/x86_64/images/boot.iso -o /tmp/boot7.iso\n# sudo livemedia-creator --make-tar --iso=/tmp/boot7.iso --ks=/path/to/centos-7.ks --image-name=centos-7-docker.tar.xz\n```\n--\n\nOnce livemedia-creator has finished, you can use the Dockerfile-TEMPLATE to\ncreate a suitable Dockerfile.\n\n### The easy way\n\nAfter you've run this command, your rootfs tarball and Dockerfile will be\nwaiting for you in `/var/tmp/containers/\u003cdatestamp\u003e/`\n\n--\n```bash\n# sudo ./containerbuild.sh centos-7.ks\n```\n--\n\nOnce this is done, you can delete the `boot.iso` files in /tmp if you wish.\n\n\n## Usage\n\nFrom here, you can either import the docker container via\n\n```\ncat centos-version-docker.tar.xz | docker import - container-name\n```\n\nOr you can create a Dockerfile to build the image directly in docker.\n\n```\nFROM scratch\nMAINTAINER you\u003cyour@email.here\u003e - ami_creator\nADD centos-version-docker.tar.xz /\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetersonwsantos%2Fvirti-docker-centos-build-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetersonwsantos%2Fvirti-docker-centos-build-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetersonwsantos%2Fvirti-docker-centos-build-scripts/lists"}