{"id":19784206,"url":"https://github.com/tinkerbell/crocodile","last_synced_at":"2025-04-30T22:32:04.839Z","repository":{"id":40662733,"uuid":"350783287","full_name":"tinkerbell/crocodile","owner":"tinkerbell","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-26T00:42:28.000Z","size":84,"stargazers_count":28,"open_issues_count":13,"forks_count":17,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-06T05:42:20.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tinkerbell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-03-23T16:33:00.000Z","updated_at":"2024-07-03T20:18:42.000Z","dependencies_parsed_at":"2023-01-30T22:50:18.540Z","dependency_job_id":null,"html_url":"https://github.com/tinkerbell/crocodile","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinkerbell%2Fcrocodile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinkerbell%2Fcrocodile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinkerbell%2Fcrocodile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinkerbell%2Fcrocodile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinkerbell","download_url":"https://codeload.github.com/tinkerbell/crocodile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251791732,"owners_count":21644447,"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-12T06:10:45.282Z","updated_at":"2025-04-30T22:32:04.518Z","avatar_url":"https://github.com/tinkerbell.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crocodile\n\nThe **Crocodile** repository contains everything that a user should need in order to build Windows{x} compressed raw images\nfor [tinkerbell](https://tinkerbell.org).\n\n**Note:** These images are for the _Community_ and are not part of [Equinix Metal Operating System Images](https://metal.equinix.com/developers/docs/operating-systems/).\n\nThe repository contains a number of key pieces:\n\n## Dockerfile\n\nThe `Dockerfile` contains everything that is needed to build a docker container with **everything** that is needed to build\nthe Operating System images:\n\n- Packer\n- Qemu-kvm\n- virtio drivers (needed for Qemu to work with disks)\n\n## Host requirements\n\n### Minimal\nFor most OS image builds, all you should really need is Docker on a reasonably modern Linux distro with KVM virtualization support. *Ubuntu docker hosts may need to reboot after ensuring that `libvirt-daemon-system` is installed prior to running crocodile. \n\n### ESXi special requirements\nTo build ESXi images we depend on special bridged networking provided by libvirt-daemon.\nTo confirm expected bridged networking, `ip link show virbr0` should succeed.\nYou will also need to add `--device=/dev/net/tun --cap-add=NET_ADMIN\" to your docker commands.\n\n### Building our container image\n\n```\ndocker build -t croc .\n```\n\nThis will take a few mins (depending on the speed of the connection to the internet), and you'll be left with a docker image\ncalled `croc:latest`\n\n## Running our `croc` container\n\nOur newly built croc container can work in two ways, either interactive or can be fully automated.\n\nWe will map two directories into our running container:\n\n`-v $PWD/packer_cache:/packer/packer_cache` - Maps the `packer_cache` to a local `packer_cache` folder, this stops ISOs repeatedly downloading.\n\n`-v $PWD/images:/var/tmp/images` - Maps a local `images` folder to where the images will be created.\n\nUbuntu docker hosts may also require the following additional options:\n\n`--privileged -it --rm -v $PWD/packer_cache:/packer/packer_cache -v $PWD/images:/var/tmp/images -v /dev/net:/dev/net`\n### Interactive\n\nWithout passing anything specific to the container it will default to starting the interactive image building process.\n```\ndocker run -it --rm \\\n-v $PWD/packer_cache:/packer/packer_cache \\\n-v $PWD/images:/var/tmp/images \\\n--net=host \\\n--device=/dev/kvm \\\ncroc:latest\n```\nThis will drop you into the crocodile shell for building your OS:\n\n```\n                          .--.  .--.\n                         /    \\/    \\\n                        | .-.  .-.   \\\n                        |/_  |/_  |   \\\n                        || `\\|| `\\|    `----.\n                        |\\0_/ \\0_/    --,    \\_\n      .--\"\"\"\"\"-.       /              (` \\     `-.\n     /          \\-----'-.              \\          \\\n     \\  () ()                         /`\\          \\\n     |                         .___.-'   |          \\\n     \\                        /` \\|      /           ;\n      `-.___             ___.' .-.`.---.|             \\\n         \\| ``-..___,.-'`\\| / /   /     |              `\\\n          `      \\|      ,`/ /   /   ,  /\n                  `      |\\ /   /    |\\/\n                   ,   .'`-;   '     \\/\n              ,    |\\-'  .'   ,   .-'`\n            .-|\\--;`` .-'     |\\.'\n           ( `\"'-.|\\ (___,.--'`'\n            `-.    `\"`          _.--'\n               `.          _.-'`-.\n                 `''---''``       `.\"\nSelect quit (1)  when you've finished building Operating Systems\n1) quit\t\t   4) esxi6.5\t     7) ubuntu-2004   10) windows-2016\n2) alma\t\t   5) esxi6.7\t     8) windows-10    11) windows-2019\n3) arch\t\t   6) esxi7.0\t     9) windows-2012\n```\n\n## Troubleshooting\n\nIn the event that a build is failing then we can debug the issue by adding `-e PACKER_LOG=1` to the `docker run`\ncommand.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinkerbell%2Fcrocodile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinkerbell%2Fcrocodile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinkerbell%2Fcrocodile/lists"}