{"id":16406585,"url":"https://github.com/odino/rkd","last_synced_at":"2025-03-23T05:31:21.016Z","repository":{"id":138006193,"uuid":"90486244","full_name":"odino/rkd","owner":"odino","description":"Think Dockerfile \u0026 docker-compose for rkt","archived":false,"fork":false,"pushed_at":"2017-05-18T14:23:00.000Z","size":69,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-01T22:34:37.087Z","etag":null,"topics":["containers","docker","docker-compose","linux","rkt","rkt-containers"],"latest_commit_sha":null,"homepage":"","language":"Go","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/odino.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-05-06T19:29:05.000Z","updated_at":"2020-12-05T10:30:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"f59e1bd9-4ad3-44d1-a1c4-006b3bd5e06a","html_url":"https://github.com/odino/rkd","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odino%2Frkd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odino%2Frkd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odino%2Frkd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odino%2Frkd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/odino","download_url":"https://codeload.github.com/odino/rkd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244277170,"owners_count":20427311,"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":["containers","docker","docker-compose","linux","rkt","rkt-containers"],"created_at":"2024-10-11T06:10:21.828Z","updated_at":"2025-03-23T05:31:20.996Z","avatar_url":"https://github.com/odino.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rkd\n\n\u003e Think Dockerfile \u0026 docker-compose for rkt containers\n\n![up](https://github.com/odino/rkd/blob/master/bin/up.png?raw=true)\n\n`rkd` (aka *rock-it dev*) is a simple tool to build\nand run [rkt containers](https://coreos.com/rkt) locally.\n\n```\n$ rkd\nDevelopment environments powered by rkt containers, with ease.\n\nUsage:\n  rkd [command]\n\nAvailable Commands:\n  build       Build the containers\n  help        Help about any command\n  up          Run the container\n  version     Print the version number of rkd\n\nFlags:\n  -h, --help   help for rkd\n\nUse \"rkd [command] --help\" for more information about a command.\n\n$ sudo rkd up\n/root/.rkd/5290facf0b502d01ba15b7de9a1b9633.aci already built\n/root/.rkd/a023872855269062eca818f2ea8c0b32.aci already built\nrkt --insecure-options=image --net=host run --interactive --volume src,kind=host,source=/home/odino/projects/go/src/github.com/odino/rkd/example/src /root/.rkd/a023872855269062eca818f2ea8c0b32.aci\n[nodemon] 1.11.0\n[nodemon] to restart at any time, enter `rs`\n[nodemon] watching: *.*\n[nodemon] starting `node index.js`\nserver started...\n```\n\n## Usage\n\nSuppose you have a [NodeJS webserver](https://github.com/odino/rkd/blob/a0038678bed322e4d48f8340c3597ac211c60463/example/src/index.js)\nrunning locally with docker-compose and want to convert it to rkt, without\nusing conversion tool like [docker2aci](https://github.com/appc/docker2aci) \u0026 the likes.\n\nFirst, create your `prod.rkd` which is basically docker's `Dockerfile`:\n\n```\nset-name example.com/node-hello\ndep add quay.io/coreos/alpine-sh\nrun -- apk add --update nodejs\ncopy src /src\nset-working-directory /src\nset-exec -- node index.js\nport add www tcp 8080\n```\n\nand create a `dev.rkd` which is your new `docker-compose.yml`, where you can\ndefine commands dependencies you only need on your local machine:\n\n```\nrun -- npm install -g nodemon\nmount add src src\nset-exec -- nodemon index.js\n```\n\nThat's it, now run `rkd up` in the [current folder](https://github.com/odino/rkd/tree/a0038678bed322e4d48f8340c3597ac211c60463/example):\n\n```\nsudo rkd up   \nBuilding /root/.rkd/prod-5290facf0b502d01ba15b7de9a1b9633.aci\nacbuild begin\nacbuild set-name example.com/node-hello\nacbuild dep add quay.io/coreos/alpine-sh\nacbuild run -- apk add --update nodejs\nDownloading quay.io/coreos/alpine-sh: [========================] 2.65 MB/2.65 MB\nfetch http://dl-4.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz\n(1/4) Installing libgcc (4.9.2-r6)\n(2/4) Installing libstdc++ (4.9.2-r6)\n(3/4) Installing libuv (1.5.0-r0)\n(4/4) Installing nodejs (0.12.10-r0)\nExecuting busybox-1.23.2-r0.trigger\nOK: 28 MiB in 19 packages\nacbuild copy src /src\nacbuild set-working-directory /src\nacbuild set-exec -- node index.js\nacbuild port add www tcp 8080\nacbuild write /root/.rkd/prod-5290facf0b502d01ba15b7de9a1b9633.aci\nacbuild end\nBuilding /root/.rkd/dev-a023872855269062eca818f2ea8c0b32.aci\nacbuild begin ./prod.aci\nacbuild run -- npm install -g nodemon\nDownloading quay.io/coreos/alpine-sh: [========================] 2.65 MB/2.65 MB\nnpm WARN optional dep failed, continuing fsevents@1.1.1\n/usr/bin/nodemon -\u003e /usr/lib/node_modules/nodemon/bin/nodemon.js\nnodemon@1.11.0 /usr/lib/node_modules/nodemon\n├── ignore-by-default@1.0.1\n├── undefsafe@0.0.3\n├── es6-promise@3.3.1\n├── debug@2.6.6 (ms@0.7.3)\n├── minimatch@3.0.4 (brace-expansion@1.1.7)\n├── touch@1.0.0 (nopt@1.0.10)\n├── ps-tree@1.1.0 (event-stream@3.3.4)\n├── lodash.defaults@3.1.2 (lodash.restparam@3.6.1, lodash.assign@3.2.0)\n├── update-notifier@0.5.0 (is-npm@1.0.0, semver-diff@2.1.0, chalk@1.1.3, string-length@1.0.1, repeating@1.1.3, configstore@1.4.0, latest-version@1.0.1)\n└── chokidar@1.7.0 (path-is-absolute@1.0.1, inherits@2.0.3, async-each@1.0.1, glob-parent@2.0.0, is-binary-path@1.0.1, is-glob@2.0.1, readdirp@2.1.0, anymatch@1.3.0)\nacbuild mount add src src\nacbuild set-exec -- nodemon index.js\nacbuild write /root/.rkd/dev-a023872855269062eca818f2ea8c0b32.aci\nacbuild end\nrkt --insecure-options=image --net=host run --interactive --volume src,kind=host,source=/home/odino/projects/go/src/github.com/odino/rkd/example/src /root/.rkd/dev-a023872855269062eca818f2ea8c0b32.aci\n[nodemon] 1.11.0\n[nodemon] to restart at any time, enter `rs`\n[nodemon] watching: *.*\n[nodemon] starting `node index.js`\nserver started...\n```\n\nand you can head to [localhost:8080](http://localhost:8080).\n\n## Installation\n\n\u003e Make sure [acbuild](https://github.com/containers/build) is installed in your system.\n\nBuilds for a few systems are available in the [releases](https://github.com/odino/rkd/releases).\n\nAlternatively, you can compile it straight away:\n\n```\ngit clone git@github.com:odino/rkd.git\ncd rkd\n\ngo build -o rkd main.go\nmv rkd /usr/local/bin\n```\n\nand then you have the `rkd` executable up \u0026 running.\n\n## Why this?\n\nOne of the arguments against rkt is that building and running containers seems\ngenerally more complicated than using docker, so I decided to figure out a way\nto replicate docker's simplicity on dev environments -- 2 files, one command,\nrunning app.\n\nThe `*.rkd` files are basically a list or `acbuild` instructions used for\nbuilding 2 ACIs (`prod.aci` \u0026 `dev.aci`): `rkd` scans them, building the ACIs,\nand bases `dev.aci` off of what it build in `prod.aci`.\n\n## Troubleshooting\n\nThere's a plethora of stuff that could / needs to be done here as this is an early stage weekend\nproject. There's very less error handling etc in the codebase and that's\nsomething I wish to work on granted that (1) I can find the time and (2) there's\nsome interest here.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodino%2Frkd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodino%2Frkd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodino%2Frkd/lists"}