{"id":20323525,"url":"https://github.com/randomvariable/imagestamper","last_synced_at":"2026-02-06T12:40:53.803Z","repository":{"id":71225851,"uuid":"304059494","full_name":"randomvariable/imagestamper","owner":"randomvariable","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-14T15:36:27.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-24T21:43:48.445Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/randomvariable.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":"2020-10-14T15:34:52.000Z","updated_at":"2020-10-14T15:36:30.000Z","dependencies_parsed_at":"2023-06-28T23:00:54.567Z","dependency_job_id":null,"html_url":"https://github.com/randomvariable/imagestamper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/randomvariable/imagestamper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomvariable%2Fimagestamper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomvariable%2Fimagestamper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomvariable%2Fimagestamper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomvariable%2Fimagestamper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/randomvariable","download_url":"https://codeload.github.com/randomvariable/imagestamper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomvariable%2Fimagestamper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29160820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T07:18:23.844Z","status":"ssl_error","status_checked_at":"2026-02-06T07:13:32.659Z","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-14T19:28:30.302Z","updated_at":"2026-02-06T12:40:53.780Z","avatar_url":"https://github.com/randomvariable.png","language":"Dockerfile","readme":"# Imagestamper\n\nExperiments in building AMIs in Docker\n\n## What this does\n\nThe following generate Docker images that are minimal, bootable root file\nsystems:\n\n``` shell\nmake centos-7 # Tested\nmake ubuntu-16.04 # Not tested\nmake ubuntu-18.04 # Not tested\n```\n\n`make test` copies this to an S3 bucket right now (hard-coded), but could\npush it into a Docker registry.\n\nFinally `make packer` starts an EC2 instance, downloads and unpacks the CentOS 7\ntar, and writes its contents to a newly formatted EBS volume, and installs\nGrub - you will need to replace the subnet_id and region parameters as\nappropriate.\n\n### Discarded ideas\n\nLinuxKit writes out an initrd and bootsector, and that's all it needs to boot.\nDiffers quite significantly from traditional distros that want\nstandard  partitions to install Grub in. This requires privileged access, so\nsome steps must be run as sudo.\n\nIn addition, in contrast to syslinux+initrd in linuxkit, we want a full disk\nimage. Even if the image is sparse, uploading to object storage ignores this.\n\nIt's therefore quicker to do the final cloud provider build on a host on that\ncloud provider where it pulls down the docker image, formats a volume and\nun-tars the image.\n\nSee [centos7.Dockerfile](centos7.Dockerfile), [test.sh](test.sh) and\n[packer.json](packer.json) to understand the process.\n\nImporting snapshots, such as done by LinuxKit, also has some odd properties\non [AWS](https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#limitations-image).\n\nThe virtual disk based systems, where these are hosted on LANs, won't need this,\nand the image can be stamped out locally without virtualisation.vv\n\n## Questions\n\n### Layering\n\nHow to DRY this up for various OS, and also have some layer separation. Probably\nwant something like this:\n\n* containerd layer\n* docker layer\n* kubelet/kubeadm layer\n* Golden layer for CentOS 7/8, Ubuntu 16.04/18.04, Photon\n* Per cloud-provider HWE layer for each Distro\n* Additional customisations\n\nFinal image examples:\n\nCentOS7-AWS-ContainerD-Kubernetes_1.13:\n\n* Docker:\n  * CentOS 7\n  * CentOS 7 AWS HWE\n  * Common containerd\n  * Common kubelet\n  * SELinux compat layer\n* Image:\n  * BIOS boot\n\nCentOS7-Azure-Docker-Kubernetes_1.13:\n\n* Docker:\n  * CentOS 7\n  * CentOS 7 Azure HWE\n  * Common docker\n  * Common kubelet\n  * SELinux compat layer\n* Image:\n  * EFI boot\n\n### Have a layer per package?\n\nThis is what LinuxKit does, but is a burden for us to do outside of each\ndistro's community.\n\n### Other TODOs\n\n* Build Kubernetes layers\n* Stamp image names / tags / drop a manifest with Docker image IDs\n* Make these not shell scripts\n* Un-hardcode everything\n\n### Windows (out-of-scope)\n\nWindows support will be different, and Dockerised equivalents may not be\nfound for any of the following:\n\n* Start with Windows Server 2019 WIM (this is a Windows equivalent of a tarball)\n* Enable Windows Containers offline\n* Gather Windows Updates offline (third party tools for this, maybe MS could provide something useful here)\n* Mount WIM\n* Copy kubelet, kube-proxy, and required binaries into place (\\\\wim\\Program Files\\Kubernetes), etc..\n* Mount WIM's system registry\n* Set up services under HKLM\n* Add customisations to OOBE XML manifest\n* Close WIM\n* Apply offline drivers for cloud providers\n* Mount empty disk, partition, format\n* Apply WIM to volume\n* Write out boot manager\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandomvariable%2Fimagestamper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandomvariable%2Fimagestamper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandomvariable%2Fimagestamper/lists"}