{"id":15043072,"url":"https://github.com/jlkiri/ikki","last_synced_at":"2025-07-27T04:04:20.620Z","repository":{"id":50657708,"uuid":"508784570","full_name":"jlkiri/ikki","owner":"jlkiri","description":"A tool for defining and running multi-container Docker applications","archived":false,"fork":false,"pushed_at":"2022-07-31T14:36:35.000Z","size":127,"stargazers_count":39,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-07T08:18:52.140Z","etag":null,"topics":["developer-tools","docker","docker-compose","ikki","kdl","orchestration"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/jlkiri.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}},"created_at":"2022-06-29T17:23:48.000Z","updated_at":"2025-03-04T23:02:17.000Z","dependencies_parsed_at":"2022-08-21T23:20:13.641Z","dependency_job_id":null,"html_url":"https://github.com/jlkiri/ikki","commit_stats":null,"previous_names":["jlkiri/unison"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jlkiri/ikki","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlkiri%2Fikki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlkiri%2Fikki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlkiri%2Fikki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlkiri%2Fikki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlkiri","download_url":"https://codeload.github.com/jlkiri/ikki/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlkiri%2Fikki/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267298386,"owners_count":24065880,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["developer-tools","docker","docker-compose","ikki","kdl","orchestration"],"created_at":"2024-09-24T20:48:32.229Z","updated_at":"2025-07-27T04:04:20.516Z","avatar_url":"https://github.com/jlkiri.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ikki\n\n![crates.io](https://img.shields.io/crates/v/ikki.svg)\n\nIkki is a tool for defining and running multi-container Docker applications. It is similar to Docker Compose but comes with some differences.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/38713361/182031379-fc284328-430f-4dd7-9599-0c078208ed49.gif\" alt=\"ikki-demo\" width=\"700\"/\u003e\n\n## Goals\n\n* Possible to make one image build dependent on another\n* Possible to \"unmigrate\" easily\n* Watch filesystem and rebuild what is necessary\n\nThe primary goal of Ikki is to make it possible to specify dependencies between multiple image builds. Consider the following two Dockerfiles:\n\n```dockerfile\n// Dockerfile.assets\nFROM node:latest\n\nWORKDIR /assets\n// output assets to current workdir\n```\n\n```dockerfile\n// Dockerfile.main\nFROM node:latest\n\n// Copy assets from previously built image\nCOPY --from=assets /assets ./assets\n// start application\n```\n\nWhen building `Dockerfile.main`, Docker (by specification) will try to find image called `assets` locally. If it does not exist, it will try to pull it from the registry. It will *not* try to build it first, because there is no way to tell it to do so. A common solution is [*multi-stage*](https://docs.docker.com/develop/develop-images/multistage-build/) builds but if more than one `Dockerfile` depends on the same base stage/image then duplication is needed. Docker Compose configuration does not help because it only allows to specify dependencies between running containers and not builds. This means that you have to give up declarative configuration partially to run some image builds in order manually. Ikki aims to preserve Compose-like configuration but also add declarative build dependency configuration in the same file. Ikki uses [KDL](https://kdl.dev/).\n\nThe secondary goal is to help the user avoid \"vendor-locking\" to Ikki and just migrate back to plain Docker CLI commands. This is done with `explain` command that just reads the Ikki config and translates the declarative configuration to imperative sequence of Docker commands that can be copy-pasted to any `bash` script as-is.\n\n## Usage\n```\nIkki container orchestrator for Docker\n\nUSAGE:\n    ikki [OPTIONS] \u003cSUBCOMMAND\u003e\n\nOPTIONS:\n    -f, --file \u003cFILE\u003e    Path to Ikki configuration file [default: ikki.kdl]\n    -h, --help           Print help information\n    -V, --version        Print version information\n\nSUBCOMMANDS:\n    build\n    explain\n    help       Print this message or the help of the given subcommand(s)\n    up         Build (or pull) all images and start the services\n```\n\n## Configuration\n\nIkki uses [KDL](https://kdl.dev/) for configuration. By default it looks for configuration in `ikki.kdl` file. The (unfinished) schema can be found in `ikki-config\\schema.kdl`. Currently the schema is not enforced and `knuffel` library is used instead.\n\nThe `images` node is basically what you would normally find in a Docker Compose file. Only those images that have a `service` configuration are run as containers with the `up` command.\n\nThe `dependencies` node is a DAG that specifies the dependencies. Names should match images names under the `images` configuration.\n\n### Example\n\n```kdl\nimages {\n    image \"protobuf\" path=\"./protobuf\" output=\"./output/protobuf\" {\n        build-arg \"PROTOBUF_VERSION\" \"1.28.0\"\n        build-arg \"PROTOC_VERSION\" \"21.4\"\n    }\n\n    image \"redis\" pull=\"redis:latest\" {\n        service {\n            ports \"6379:6379\"\n        }\n    }\n    \n    image \"db\" pull=\"postgres:latest\" {\n        service {\n            env \"POSTGRES_PASSWORD\" \"example\"\n            env \"POSTGRES_USER\" \"test\"\n\n            ports \"5432:5432\"\n        }\n    }\n\n    image \"api\" path=\"./api\" {\n        service {\n            mount type=\"volume\" src=\"cache\" dest=\"/cache\"\n            mount type=\"bind\" src=\"./api/config\" dest=\"/config\"\n\n            ports \"3000:3000\"\n        }\n    }\n\n    image \"cli-rust\" path=\"./cli\"\n}\n\ndependencies {\n    api {\n        protobuf\n        redis\n        db\n    }\n    cli-rust {\n        protobuf\n    }\n}\n```\n\n### Explain\n\nBy using the `explain` command it is possible to turn the above config into a sequence of Docker commands:\n\n```\n❯ ikki explain\ndocker build --build-arg PROTOBUF_VERSION=1.28.0 --build-arg PROTOC_VERSION=21.4 --tag protobuf ./protobuf\ndocker pull redis:latest\ndocker pull postgres:latest\ndocker build --tag api ./api\ndocker build --tag cli-rust ./cli\ndocker run --name redis --publish 6379:6379 redis:latest\ndocker run --name db --env POSTGRES_PASSWORD=example --env POSTGRES_USER=test --publish 5432:5432 postgres:latest\ndocker run --name api --publish 3000:3000 api\n```\n\n## Status\n\n**Experimental**\n\nUse at your own risk. The following is the rough TODO list:\n\n- [ ] Reach parity with Docker Compose by recognizing more options and passing them to the Docker daemon\n- [ ] Distinguish build and run dependencies\n\n## Install\n\n### From source\n```\ncargo install ikki\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlkiri%2Fikki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlkiri%2Fikki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlkiri%2Fikki/lists"}