{"id":28195582,"url":"https://github.com/davdiv/buildahcker","last_synced_at":"2025-05-16T14:13:44.000Z","repository":{"id":226803283,"uuid":"769688789","full_name":"davdiv/buildahcker","owner":"davdiv","description":"Buildahcker is a node.js library to create and run commands in OCI (Open Container Initiative) container images (or docker images), based on Buildah and a hash-based cache. It also contains utilities to easily create a partitioned bootable disk image of a Linux system.","archived":false,"fork":false,"pushed_at":"2025-01-02T10:38:53.000Z","size":398,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-05T22:17:27.623Z","etag":null,"topics":["alpine","bootable","build","buildah","cache","container","disk","docker","gpt","grub","hash","oci-image","parted","partition","squashfs"],"latest_commit_sha":null,"homepage":"https://davdiv.github.io/buildahcker/","language":"TypeScript","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/davdiv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-03-09T19:22:24.000Z","updated_at":"2025-04-26T02:31:45.000Z","dependencies_parsed_at":"2024-04-20T23:48:09.463Z","dependency_job_id":"719545bd-ceab-44f6-85be-aa725473a6d9","html_url":"https://github.com/davdiv/buildahcker","commit_stats":null,"previous_names":["davdiv/buildahcker"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davdiv%2Fbuildahcker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davdiv%2Fbuildahcker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davdiv%2Fbuildahcker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davdiv%2Fbuildahcker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davdiv","download_url":"https://codeload.github.com/davdiv/buildahcker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544130,"owners_count":22088808,"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":["alpine","bootable","build","buildah","cache","container","disk","docker","gpt","grub","hash","oci-image","parted","partition","squashfs"],"created_at":"2025-05-16T14:13:43.782Z","updated_at":"2025-05-16T14:13:43.990Z","avatar_url":"https://github.com/davdiv.png","language":"TypeScript","readme":"# Buildahcker\n\n[![npm](https://img.shields.io/npm/v/buildahcker)](https://www.npmjs.com/package/buildahcker)\n\nBuildahcker is a node.js library to create and run commands in OCI (Open Container Initiative) container images (or docker images), based on [Buildah](https://buildah.io/) and a hash-based cache. It also contains utilities to easily create a partitioned bootable disk image of a Linux system.\n\nHave a look to the [API documentation here](https://davdiv.github.io/buildahcker/).\n\n## Installation\n\n```bash\nnpm install buildahcker --save-dev\n```\n\n## Usage\n\nHere is a basic sample:\n\n```typescript\nimport {\n  defaultContainerCache,\n  ImageBuilder,\n  run,\n  addFiles,\n  MemFile,\n  DiskLocation,\n} from \"buildahcker\";\n\nconst createImage = async () =\u003e {\n  const builder = await ImageBuilder.from(\"alpine:latest\", {\n    logger: process.stdout,\n    containerCache: defaultContainerCache(),\n  });\n  await builder.executeStep([\n    run([\"apk\", \"add\", \"--no-cache\", \"nginx\"]),\n    addFiles({\n      \"etc/issue\": new MemFile({\n        content: \"Hello\",\n      }),\n      app: new DiskLocation(\"./app\", {\n        overrideAttributes: { uid: 1, gid: 2 },\n      }),\n    }),\n  ]);\n  console.log(\"Created image: \", builder.imageId);\n};\n\ncreateImage();\n```\n\nCheck the [tests](https://github.com/davdiv/buildahcker/tree/main/test) and [this sample repository](https://github.com/davdiv/buildahcker-alpine-sample) for more usage examples.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavdiv%2Fbuildahcker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavdiv%2Fbuildahcker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavdiv%2Fbuildahcker/lists"}